Changeset 3025661
- Timestamp:
- 01/23/2024 11:10:38 AM (2 years ago)
- Location:
- wallets/trunk
- Files:
-
- 20 added
- 20 deleted
- 12 edited
-
adapters/class-bank-fiat-adapter.php (modified) (3 diffs)
-
adapters/class-bitcoin-core-like-wallet-adapter.php (modified) (1 diff)
-
admin/assets.php (modified) (7 diffs)
-
admin/dashboard.php (modified) (1 diff)
-
apis/wp-rest.php (modified) (6 diffs)
-
assets/scripts/bs58check-6.2.3.min.js (deleted)
-
assets/scripts/bs58check-6.2.3.min.js.map (deleted)
-
assets/scripts/bs58check-6.2.4.min.js (added)
-
assets/scripts/bs58check-6.2.4.min.js.map (added)
-
assets/scripts/wallets-admin-capabilities-6.2.3.min.js (deleted)
-
assets/scripts/wallets-admin-capabilities-6.2.3.min.js.map (deleted)
-
assets/scripts/wallets-admin-capabilities-6.2.4.min.js (added)
-
assets/scripts/wallets-admin-capabilities-6.2.4.min.js.map (added)
-
assets/scripts/wallets-admin-cs-tool-6.2.3.min.js (deleted)
-
assets/scripts/wallets-admin-cs-tool-6.2.3.min.js.map (deleted)
-
assets/scripts/wallets-admin-cs-tool-6.2.4.min.js (added)
-
assets/scripts/wallets-admin-cs-tool-6.2.4.min.js.map (added)
-
assets/scripts/wallets-admin-dashboard-6.2.3.min.js (deleted)
-
assets/scripts/wallets-admin-dashboard-6.2.3.min.js.map (deleted)
-
assets/scripts/wallets-admin-dashboard-6.2.4.min.js (added)
-
assets/scripts/wallets-admin-dashboard-6.2.4.min.js.map (added)
-
assets/scripts/wallets-admin-deposit-tool-6.2.3.min.js (deleted)
-
assets/scripts/wallets-admin-deposit-tool-6.2.3.min.js.map (deleted)
-
assets/scripts/wallets-admin-deposit-tool-6.2.4.min.js (added)
-
assets/scripts/wallets-admin-deposit-tool-6.2.4.min.js.map (added)
-
assets/scripts/wallets-admin-docs-6.2.3.min.js (deleted)
-
assets/scripts/wallets-admin-docs-6.2.3.min.js.map (deleted)
-
assets/scripts/wallets-admin-docs-6.2.4.min.js (added)
-
assets/scripts/wallets-admin-docs-6.2.4.min.js.map (added)
-
assets/scripts/wallets-admin-editor-6.2.3.min.js (deleted)
-
assets/scripts/wallets-admin-editor-6.2.3.min.js.map (deleted)
-
assets/scripts/wallets-admin-editor-6.2.4.min.js (added)
-
assets/scripts/wallets-admin-editor-6.2.4.min.js.map (added)
-
assets/scripts/wallets-admin-menu-item-6.2.3.min.js (deleted)
-
assets/scripts/wallets-admin-menu-item-6.2.3.min.js.map (deleted)
-
assets/scripts/wallets-admin-menu-item-6.2.4.min.js (added)
-
assets/scripts/wallets-admin-menu-item-6.2.4.min.js.map (added)
-
assets/scripts/wallets-front-6.2.3.min.js (deleted)
-
assets/scripts/wallets-front-6.2.3.min.js.map (deleted)
-
assets/scripts/wallets-front-6.2.4.min.js (added)
-
assets/scripts/wallets-front-6.2.4.min.js.map (added)
-
assets/styles/wallets-6.2.3.min.css (deleted)
-
assets/styles/wallets-6.2.4.min.css (added)
-
assets/styles/wallets-admin-6.2.3.min.css (deleted)
-
assets/styles/wallets-admin-6.2.4.min.css (added)
-
docs/developer.md (modified) (2 diffs)
-
frontend/assets.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
-
templates/deposit-list.php (modified) (1 diff)
-
templates/deposit.php (modified) (1 diff)
-
templates/withdraw.php (modified) (1 diff)
-
wallets.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wallets/trunk/adapters/class-bank-fiat-adapter.php
r3020891 r3025661 158 158 159 159 public function get_wallet_version(): string { 160 return '6.2. 3';160 return '6.2.4'; 161 161 } 162 162 … … 450 450 } 451 451 452 if ( ! ds_current_user_can( 'has_wallet ' ) ) {452 if ( ! ds_current_user_can( 'has_wallets' ) ) { 453 453 return new \WP_Error( 454 454 'user_without_wallet', … … 683 683 get_asset_path( 'wallets-admin-deposit-tool' ), 684 684 [ 'jquery' ], 685 '6.2. 3',685 '6.2.4', 686 686 true 687 687 ); -
wallets/trunk/adapters/class-bitcoin-core-like-wallet-adapter.php
r3020891 r3025661 738 738 [ 739 739 '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', 741 741 'headers' => [ 742 742 'Accept-Encoding: gzip', -
wallets/trunk/admin/assets.php
r3020891 r3025661 22 22 get_asset_path( 'wallets-admin', 'style' ), 23 23 [], 24 '6.2. 3'24 '6.2.4' 25 25 ); 26 26 … … 52 52 get_asset_path( 'wallets-admin-menu-item' ), 53 53 [ 'jquery' ], 54 '6.2. 3',54 '6.2.4', 55 55 true 56 56 ); … … 60 60 get_asset_path( 'wallets-admin-cs-tool' ), 61 61 [ 'jquery-qrcode' ], 62 '6.2. 3',62 '6.2.4', 63 63 true 64 64 ); … … 75 75 get_asset_path( 'wallets-admin-capabilities' ), 76 76 [ 'jquery-ui-tabs' ], 77 '6.2. 3',77 '6.2.4', 78 78 true 79 79 ); … … 83 83 get_asset_path( 'wallets-admin-dashboard' ), 84 84 [ 'jquery-ui-tabs', 'jqcloud' ], 85 '6.2. 3',85 '6.2.4', 86 86 true 87 87 ); … … 91 91 get_asset_path( 'wallets-admin-docs' ), 92 92 [ 'jquery' ], 93 '6.2. 3',93 '6.2.4', 94 94 true 95 95 ); … … 99 99 get_asset_path( 'wallets-admin-editor' ), 100 100 [ 'suggest' ], 101 '6.2. 3',101 '6.2.4', 102 102 true 103 103 ); -
wallets/trunk/admin/dashboard.php
r3020891 r3025661 349 349 global $wpdb; 350 350 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'; 353 353 $debug_data[ (string) __( 'Web Server', 'wallets' ) ] = $_SERVER['SERVER_SOFTWARE']; 354 354 $debug_data[ (string) __( 'PHP version', 'wallets' ) ] = PHP_VERSION; -
wallets/trunk/apis/wp-rest.php
r3015422 r3025661 125 125 'methods' => \WP_REST_SERVER::READABLE, 126 126 'callback' => function( $data ) { 127 $currencies = get_all_currencies(); 127 $currencies = get_all_currencies(); 128 $exclude_tags = explode(',',$data['exclude_tags'] ); 128 129 $result = []; 129 130 130 131 foreach ( $currencies as $currency ) { 132 if ( array_intersect( $currency->tags, $exclude_tags ) ) { 133 continue; 134 } 131 135 132 136 $rates = []; … … 269 273 'is_online' => $currency->is_online(), 270 274 'block_height' => $block_height, 275 'tags' => $currency->tags, 271 276 ]; 272 277 … … 287 292 'methods' => \WP_REST_SERVER::READABLE, 288 293 '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'] ); 291 297 292 298 $currencies = get_all_currencies(); … … 297 303 298 304 foreach ( $currencies as $currency ) { 305 306 if ( array_intersect( $currency->tags, $exclude_tags ) ) { 307 continue; 308 } 299 309 300 310 $rates = []; … … 351 361 'sanitize_callback' => 'absint', 352 362 ], 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 ], ], 355 374 'permission_callback' => $permission_callback, 356 375 ] … … 425 444 'sanitize_callback' => 'absint', 426 445 ], 427 428 446 ], 429 447 'permission_callback' => $permission_callback, -
wallets/trunk/docs/developer.md
r3015422 r3025661 240 240 | *Method* | `GET` | 241 241 | *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 | 243 243 | *Requires login* | No | 244 244 | *Requires capabilities* | No | … … 266 266 | *Method* | `GET` | 267 267 | *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 | 269 269 | *Requires login* | No | 270 270 | *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 23 23 get_asset_path( 'wallets', 'style' ), 24 24 [], 25 '6.2. 3'25 '6.2.4' 26 26 ); 27 27 … … 86 86 get_asset_path( 'jsqrcode' ), 87 87 [ 'jquery' ], 88 '6.2. 3',88 '6.2.4', 89 89 true 90 90 ); … … 128 128 get_asset_path( 'wallets-front' ), 129 129 [ 'knockout', 'jquery', 'style-scoped', 'sprintf.js' ], 130 '6.2. 3',130 '6.2.4', 131 131 true 132 132 ); -
wallets/trunk/readme.txt
r3020891 r3025661 6 6 Tested up to: 6.4.2 7 7 Requires PHP: 5.6 8 Stable tag: 6.2. 38 Stable tag: 6.2.4 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 337 337 338 338 == 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. 339 343 340 344 = 6.2.3 = … … 1549 1553 == Upgrade Notice == 1550 1554 1551 Version `6.2. 3` is a bugfix release.1555 Version `6.2.4` is a bugfix release. 1552 1556 1553 1557 == Donating == -
wallets/trunk/templates/deposit-list.php
r2973854 r3025661 251 251 url: `${dsWallets.rest.url}dswallets/v1/users/${dsWallets.user.id}/currencies`, 252 252 cache: true !== force, 253 data: { 254 'exclude_tags': '<?php echo esc_js( implode(",", apply_filters( "wallets_deposit_currency_dropdown_exclude_tags", ["fiat"] ) ) ); ?>', 255 }, 253 256 headers: { 254 257 'X-WP-Nonce': dsWallets.rest.nonce, -
wallets/trunk/templates/deposit.php
r2973854 r3025661 340 340 url: `${dsWallets.rest.url}dswallets/v1/users/${dsWallets.user.id}/currencies`, 341 341 cache: true !== force, 342 data: { 343 'exclude_tags': '<?php echo esc_js( implode(",", apply_filters( "wallets_deposit_currency_dropdown_exclude_tags", ["fiat"] ) ) ); ?>', 344 }, 342 345 headers: { 343 346 'X-WP-Nonce': dsWallets.rest.nonce, -
wallets/trunk/templates/withdraw.php
r2973854 r3025661 382 382 $.ajax( { 383 383 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 }, 384 387 headers: { 385 388 'X-WP-Nonce': dsWallets.rest.nonce, 386 389 }, 387 390 success: function( response ) { 388 self.currencies( response .filter( function( c ) { return !c.is_fiat; } ));391 self.currencies( response ); 389 392 390 393 $.ajax( { -
wallets/trunk/wallets.php
r3020891 r3025661 3 3 * Plugin Name: Bitcoin and Altcoin Wallets 4 4 * Description: Custodial cryptocurrency wallets. 5 * Version: 6.2. 35 * Version: 6.2.4 6 6 * Plugin URI: https://www.dashed-slug.net/bitcoin-altcoin-wallets-wordpress-plugin 7 7 * Requires at least: 5.0
Note: See TracChangeset
for help on using the changeset viewer.