This commit is contained in:
shuoer86 2023-12-02 17:13:28 +08:00 committed by GitHub
parent 44b7ed0e6e
commit 60ff7e86b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -4473,7 +4473,7 @@ clientBasic.PreviewUpdateStoreRateConfiguration(user.StoreId, new StoreRateConfi
await AssertHttpError(404, async () => await withdrawalClient.SimulateCustodianAccountWithdrawal(storeId, "WRONG-ACCOUNT-ID", simulateWithdrawalRequest)); await AssertHttpError(404, async () => await withdrawalClient.SimulateCustodianAccountWithdrawal(storeId, "WRONG-ACCOUNT-ID", simulateWithdrawalRequest));
// Test: SimulateWithdrawal, wrong store ID // Test: SimulateWithdrawal, wrong store ID
// TODO it is wierd that 403 is considered normal, but it is like this for all calls where the store is wrong... I'd have preferred a 404 error, because the store cannot be found. // TODO it is weird that 403 is considered normal, but it is like this for all calls where the store is wrong... I'd have preferred a 404 error, because the store cannot be found.
await AssertHttpError(403, async () => await withdrawalClient.SimulateCustodianAccountWithdrawal("WRONG-STORE-ID", accountId, simulateWithdrawalRequest)); await AssertHttpError(403, async () => await withdrawalClient.SimulateCustodianAccountWithdrawal("WRONG-STORE-ID", accountId, simulateWithdrawalRequest));
// Test: SimulateWithdrawal, correct payment method, wrong amount // Test: SimulateWithdrawal, correct payment method, wrong amount
@ -4504,7 +4504,7 @@ clientBasic.PreviewUpdateStoreRateConfiguration(user.StoreId, new StoreRateConfi
await AssertHttpError(404, async () => await withdrawalClient.CreateCustodianAccountWithdrawal(storeId, "WRONG-ACCOUNT-ID", createWithdrawalRequest)); await AssertHttpError(404, async () => await withdrawalClient.CreateCustodianAccountWithdrawal(storeId, "WRONG-ACCOUNT-ID", createWithdrawalRequest));
// Test: CreateWithdrawal, wrong store ID // Test: CreateWithdrawal, wrong store ID
// TODO it is wierd that 403 is considered normal, but it is like this for all calls where the store is wrong... I'd have preferred a 404 error, because the store cannot be found. // TODO it is weird that 403 is considered normal, but it is like this for all calls where the store is wrong... I'd have preferred a 404 error, because the store cannot be found.
await AssertHttpError(403, async () => await withdrawalClient.CreateCustodianAccountWithdrawal("WRONG-STORE-ID", accountId, createWithdrawalRequest)); await AssertHttpError(403, async () => await withdrawalClient.CreateCustodianAccountWithdrawal("WRONG-STORE-ID", accountId, createWithdrawalRequest));
// Test: CreateWithdrawal, correct payment method, wrong amount // Test: CreateWithdrawal, correct payment method, wrong amount

View File

@ -14,7 +14,7 @@ declare -A xpubs
printf "\n👛 Create descriptor wallets\n\n" printf "\n👛 Create descriptor wallets\n\n"
for ((n=1;n<=3;n++)); do for ((n=1;n<=3;n++)); do
# Create descriptor wallets, surpress error output in case wallet already exists # Create descriptor wallets, suppress error output in case wallet already exists
./docker-bitcoin-cli.sh -named createwallet wallet_name="${prefix}_part_${n}" descriptors=true > /dev/null 2>&1 ./docker-bitcoin-cli.sh -named createwallet wallet_name="${prefix}_part_${n}" descriptors=true > /dev/null 2>&1
# Collect xpubs # Collect xpubs
@ -38,7 +38,7 @@ multisig_int_desc="{\"desc\": $internal_desc_sum, \"active\": true, \"internal\"
multisig_desc="[$multisig_ext_desc, $multisig_int_desc]" multisig_desc="[$multisig_ext_desc, $multisig_int_desc]"
# Create multisig wallet, surpress error output in case wallet already exists # Create multisig wallet, suppress error output in case wallet already exists
printf "\n🔐 Create multisig wallet\n" printf "\n🔐 Create multisig wallet\n"
printf "\nExternal descriptor: $external_desc\n" printf "\nExternal descriptor: $external_desc\n"

View File

@ -83,7 +83,7 @@
if (Model.PaginationQuery != null) if (Model.PaginationQuery != null)
{ {
// merge both, prefering the `query` properties in case of duplicate keys // merge both, preferring the `query` properties in case of duplicate keys
query = query.Concat(Model.PaginationQuery) query = query.Concat(Model.PaginationQuery)
.GroupBy(e => e.Key) .GroupBy(e => e.Key)
.ToDictionary(g => g.Key, g => g.First().Value); .ToDictionary(g => g.Key, g => g.First().Value);