Plugin Directory

Changeset 3025661


Ignore:
Timestamp:
01/23/2024 11:10:38 AM (2 years ago)
Author:
dashedslug
Message:

Adding version 6.2.4 of wallets

Location:
wallets/trunk
Files:
20 added
20 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • wallets/trunk/adapters/class-bank-fiat-adapter.php

    r3020891 r3025661  
    158158
    159159    public function get_wallet_version(): string {
    160         return '6.2.3';
     160        return '6.2.4';
    161161    }
    162162
     
    450450                        }
    451451
    452                         if ( ! ds_current_user_can( 'has_wallet' ) ) {
     452                        if ( ! ds_current_user_can( 'has_wallets' ) ) {
    453453                            return new \WP_Error(
    454454                                'user_without_wallet',
     
    683683                    get_asset_path( 'wallets-admin-deposit-tool' ),
    684684                    [ 'jquery' ],
    685                     '6.2.3',
     685                    '6.2.4',
    686686                    true
    687687                );
  • wallets/trunk/adapters/class-bitcoin-core-like-wallet-adapter.php

    r3020891 r3025661  
    738738                [
    739739                    'timeout'     => absint( get_ds_option( 'wallets_http_timeout', 5 ) ),
    740                     'user-agent'  => 'Bitcoin and Altcoin Wallets version 6.2.3',
     740                    'user-agent'  => 'Bitcoin and Altcoin Wallets version 6.2.4',
    741741                    'headers'     => [
    742742                        'Accept-Encoding: gzip',
  • wallets/trunk/admin/assets.php

    r3020891 r3025661  
    2222                get_asset_path( 'wallets-admin', 'style' ),
    2323                [],
    24                 '6.2.3'
     24                '6.2.4'
    2525            );
    2626
     
    5252                get_asset_path( 'wallets-admin-menu-item' ),
    5353                [ 'jquery' ],
    54                 '6.2.3',
     54                '6.2.4',
    5555                true
    5656            );
     
    6060                get_asset_path( 'wallets-admin-cs-tool' ),
    6161                [ 'jquery-qrcode' ],
    62                 '6.2.3',
     62                '6.2.4',
    6363                true
    6464            );
     
    7575                get_asset_path( 'wallets-admin-capabilities' ),
    7676                [ 'jquery-ui-tabs' ],
    77                 '6.2.3',
     77                '6.2.4',
    7878                true
    7979            );
     
    8383                get_asset_path( 'wallets-admin-dashboard' ),
    8484                [ 'jquery-ui-tabs', 'jqcloud' ],
    85                 '6.2.3',
     85                '6.2.4',
    8686                true
    8787            );
     
    9191                get_asset_path( 'wallets-admin-docs' ),
    9292                [ 'jquery' ],
    93                 '6.2.3',
     93                '6.2.4',
    9494                true
    9595            );
     
    9999                get_asset_path( 'wallets-admin-editor' ),
    100100                [ 'suggest' ],
    101                 '6.2.3',
     101                '6.2.4',
    102102                true
    103103            );
  • wallets/trunk/admin/dashboard.php

    r3020891 r3025661  
    349349        global $wpdb;
    350350
    351         $debug_data[ (string) __( 'Plugin version', 'wallets' ) ]         = '6.2.3';
    352         $debug_data[ (string) __( 'Git SHA', 'wallets' ) ]                = '81fdc730';
     351        $debug_data[ (string) __( 'Plugin version', 'wallets' ) ]         = '6.2.4';
     352        $debug_data[ (string) __( 'Git SHA', 'wallets' ) ]                = 'aa58b70d';
    353353        $debug_data[ (string) __( 'Web Server', 'wallets' ) ]             = $_SERVER['SERVER_SOFTWARE'];
    354354        $debug_data[ (string) __( 'PHP version', 'wallets' ) ]            = PHP_VERSION;
  • wallets/trunk/apis/wp-rest.php

    r3015422 r3025661  
    125125                'methods'  => \WP_REST_SERVER::READABLE,
    126126                'callback' => function( $data ) {
    127                     $currencies = get_all_currencies();
     127                    $currencies   = get_all_currencies();
     128                    $exclude_tags = explode(',',$data['exclude_tags'] );
    128129                    $result     = [];
    129130
    130131                    foreach ( $currencies as $currency ) {
     132                        if ( array_intersect( $currency->tags, $exclude_tags ) ) {
     133                            continue;
     134                        }
    131135
    132136                        $rates = [];
     
    269273                        'is_online'         => $currency->is_online(),
    270274                        'block_height'      => $block_height,
     275                        'tags'              => $currency->tags,
    271276                    ];
    272277
     
    287292                'methods'  => \WP_REST_SERVER::READABLE,
    288293                'callback' => function( $data ) {
    289                     $params  = $data->get_url_params();
    290                     $user_id = $params['user_id'];
     294                    $params       = $data->get_url_params();
     295                    $user_id      = $params['user_id'];
     296                    $exclude_tags = explode(',',$data['exclude_tags'] );
    291297
    292298                    $currencies           = get_all_currencies();
     
    297303
    298304                    foreach ( $currencies as $currency ) {
     305
     306                        if ( array_intersect( $currency->tags, $exclude_tags ) ) {
     307                            continue;
     308                        }
    299309
    300310                        $rates = [];
     
    351361                        'sanitize_callback' => 'absint',
    352362                    ],
    353 
    354                 ],
     363                    'exclude_tags' => [
     364                        'required' => false,
     365                        'validate_callback' => function( $param, $request, $key ) {
     366                            foreach ( explode( ',', $param ) as $slug ) {
     367                                if ( ! preg_match( '/^[a-z0-9]+(?:-[a-z0-9]+)*$/', $slug ) ) {
     368                                    return false;
     369                                }
     370                            }
     371                            return true;
     372                        }
     373                    ],              ],
    355374                'permission_callback' => $permission_callback,
    356375            ]
     
    425444                        'sanitize_callback' => 'absint',
    426445                    ],
    427 
    428446                ],
    429447                'permission_callback' => $permission_callback,
  • wallets/trunk/docs/developer.md

    r3015422 r3025661  
    240240| *Method* | `GET` |
    241241| *URI Parameters* | none |
    242 | *Optional GET Parameters* | None |
     242| *Optional GET Parameters* | `exclude_tags`, a comma-separated list of tags, where currencies with these tags will not be returned |
    243243| *Requires login* | No |
    244244| *Requires capabilities* | No |
     
    266266| *Method* | `GET` |
    267267| *URI Parameters* | `USER_ID`, an integer |
    268 | *Optional GET Parameters* | None |
     268| *Optional GET Parameters* | `exclude_tags`, a comma-separated list of tags, where currencies with these tags will not be returned |
    269269| *Requires login* | No |
    270270| *Requires capabilities* | `has_wallets` is required. If data on a user other than the currently logged in user is requested, the endpoit requires the current user to have `manage_wallets`. |
  • wallets/trunk/frontend/assets.php

    r3020891 r3025661  
    2323            get_asset_path( 'wallets', 'style' ),
    2424            [],
    25             '6.2.3'
     25            '6.2.4'
    2626        );
    2727
     
    8686            get_asset_path( 'jsqrcode' ),
    8787            [ 'jquery' ],
    88             '6.2.3',
     88            '6.2.4',
    8989            true
    9090        );
     
    128128            get_asset_path( 'wallets-front' ),
    129129            [ 'knockout', 'jquery', 'style-scoped', 'sprintf.js' ],
    130             '6.2.3',
     130            '6.2.4',
    131131            true
    132132        );
  • wallets/trunk/readme.txt

    r3020891 r3025661  
    66Tested up to: 6.4.2
    77Requires PHP: 5.6
    8 Stable tag: 6.2.3
     8Stable tag: 6.2.4
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    337337
    338338== Changelog ==
     339
     340= 6.2.4 =
     341- Fix: Issue with Fiat Withdrawals not checking for the `has_wallets` capability correctly is now fixed.
     342- Add: Extensible way to exclude some currency tags from `[wallets_deposit]` and `[wallets_withdraw]` shortcodes, for the upcoming Taproot Assets adapter.
    339343
    340344= 6.2.3 =
     
    15491553== Upgrade Notice ==
    15501554
    1551 Version `6.2.3` is a bugfix release.
     1555Version `6.2.4` is a bugfix release.
    15521556
    15531557== Donating ==
  • wallets/trunk/templates/deposit-list.php

    r2973854 r3025661  
    251251                    url: `${dsWallets.rest.url}dswallets/v1/users/${dsWallets.user.id}/currencies`,
    252252                    cache: true !== force,
     253                    data: {
     254                        'exclude_tags': '<?php echo esc_js( implode(",", apply_filters( "wallets_deposit_currency_dropdown_exclude_tags", ["fiat"] ) ) ); ?>',
     255                    },
    253256                    headers: {
    254257                        'X-WP-Nonce': dsWallets.rest.nonce,
  • wallets/trunk/templates/deposit.php

    r2973854 r3025661  
    340340                    url: `${dsWallets.rest.url}dswallets/v1/users/${dsWallets.user.id}/currencies`,
    341341                    cache: true !== force,
     342                    data: {
     343                        'exclude_tags': '<?php echo esc_js( implode(",", apply_filters( "wallets_deposit_currency_dropdown_exclude_tags", ["fiat"] ) ) ); ?>',
     344                    },
    342345                    headers: {
    343346                        'X-WP-Nonce': dsWallets.rest.nonce,
  • wallets/trunk/templates/withdraw.php

    r2973854 r3025661  
    382382                $.ajax( {
    383383                    url: dsWallets.rest.url + 'dswallets/v1/users/<?php echo get_current_user_id(); ?>/currencies',
     384                    data: {
     385                        'exclude_tags': '<?php echo esc_js( implode(",", apply_filters( "wallets_withdraw_currency_dropdown_exclude_tags", ["fiat"] ) ) ); ?>',
     386                    },
    384387                    headers: {
    385388                        'X-WP-Nonce': dsWallets.rest.nonce,
    386389                    },
    387390                    success: function( response ) {
    388                         self.currencies( response.filter( function( c ) { return !c.is_fiat; } ) );
     391                        self.currencies( response );
    389392
    390393                        $.ajax( {
  • wallets/trunk/wallets.php

    r3020891 r3025661  
    33 * Plugin Name:         Bitcoin and Altcoin Wallets
    44 * Description:         Custodial cryptocurrency wallets.
    5  * Version:             6.2.3
     5 * Version:             6.2.4
    66 * Plugin URI:          https://www.dashed-slug.net/bitcoin-altcoin-wallets-wordpress-plugin
    77 * Requires at least:   5.0
Note: See TracChangeset for help on using the changeset viewer.