Skip to content

Commit ce8e02d

Browse files
committed
this commit mirrors the 6.2.4 release
1 parent 8dba6a9 commit ce8e02d

32 files changed

+59
-28
lines changed

adapters/class-bank-fiat-adapter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public function do_description_text(): void {
157157
}
158158

159159
public function get_wallet_version(): string {
160-
return '6.2.3';
160+
return '6.2.4';
161161
}
162162

163163
public function get_block_height( Currency $currency = null ): int {
@@ -449,7 +449,7 @@ function( string $subject, Transaction $tx ): string {
449449
);
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',
455455
(string) __( 'Specified user not allowed to have wallets!', 'wallets' ),
@@ -682,7 +682,7 @@ function() {
682682
'wallets-admin-deposit-tool',
683683
get_asset_path( 'wallets-admin-deposit-tool' ),
684684
[ 'jquery' ],
685-
'6.2.3',
685+
'6.2.4',
686686
true
687687
);
688688
}

adapters/class-bitcoin-core-like-wallet-adapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ protected function rpc( string $method, ...$params ) {
737737
$this->get_url( true ),
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',
743743
'Content-type: application/json',

admin/assets.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function( $hook ) {
2121
'wallets-admin-styles',
2222
get_asset_path( 'wallets-admin', 'style' ),
2323
[],
24-
'6.2.3'
24+
'6.2.4'
2525
);
2626

2727
wp_register_script(
@@ -51,15 +51,15 @@ function( $hook ) {
5151
'wallets-admin-menu-item',
5252
get_asset_path( 'wallets-admin-menu-item' ),
5353
[ 'jquery' ],
54-
'6.2.3',
54+
'6.2.4',
5555
true
5656
);
5757

5858
wp_register_script(
5959
'wallets-admin-cs-tool',
6060
get_asset_path( 'wallets-admin-cs-tool' ),
6161
[ 'jquery-qrcode' ],
62-
'6.2.3',
62+
'6.2.4',
6363
true
6464
);
6565

@@ -74,31 +74,31 @@ function( $hook ) {
7474
'wallets-admin-capabilities',
7575
get_asset_path( 'wallets-admin-capabilities' ),
7676
[ 'jquery-ui-tabs' ],
77-
'6.2.3',
77+
'6.2.4',
7878
true
7979
);
8080

8181
wp_register_script(
8282
'wallets-admin-dashboard',
8383
get_asset_path( 'wallets-admin-dashboard' ),
8484
[ 'jquery-ui-tabs', 'jqcloud' ],
85-
'6.2.3',
85+
'6.2.4',
8686
true
8787
);
8888

8989
wp_register_script(
9090
'wallets-admin-docs',
9191
get_asset_path( 'wallets-admin-docs' ),
9292
[ 'jquery' ],
93-
'6.2.3',
93+
'6.2.4',
9494
true
9595
);
9696

9797
wp_register_script(
9898
'wallets-admin-editor',
9999
get_asset_path( 'wallets-admin-editor' ),
100100
[ 'suggest' ],
101-
'6.2.3',
101+
'6.2.4',
102102
true
103103
);
104104

admin/dashboard.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,8 @@ function db_debug_cb() {
348348
function( $debug_data ) {
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;
355355
$debug_data[ (string) __( 'WordPress version', 'wallets' ) ] = (string) get_bloginfo( 'version' );

apis/wp-rest.php

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,14 @@ function() {
124124
[
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 = [];
133137
$vs_currencies = get_ds_option( 'wallets_rates_vs', [] );
@@ -268,6 +272,7 @@ function() {
268272
'is_fiat' => $currency->is_fiat(),
269273
'is_online' => $currency->is_online(),
270274
'block_height' => $block_height,
275+
'tags' => $currency->tags,
271276
];
272277

273278
$max_age = max( 0, absint( get_ds_option( 'wallets_polling_interval', 0 ) ) - 1 );
@@ -286,8 +291,9 @@ function() {
286291
[
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();
293299
$balances = get_all_balances_assoc_for_user( $user_id );
@@ -297,6 +303,10 @@ function() {
297303

298304
foreach ( $currencies as $currency ) {
299305

306+
if ( array_intersect( $currency->tags, $exclude_tags ) ) {
307+
continue;
308+
}
309+
300310
$rates = [];
301311
$vs_currencies = get_ds_option( 'wallets_rates_vs', [] );
302312
if ( $vs_currencies && is_array( $vs_currencies ) ) {
@@ -350,8 +360,17 @@ function() {
350360
'user_id' => [
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
]
357376
);
@@ -424,7 +443,6 @@ function() {
424443
'user_id' => [
425444
'sanitize_callback' => 'absint',
426445
],
427-
428446
],
429447
'permission_callback' => $permission_callback,
430448
]
File renamed without changes.

0 commit comments

Comments
 (0)