diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-07-20 16:20:32 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-07-20 16:20:32 +0530 |
commit | d331f8b8b66e52a645dedefa7b7c31740dc309dc (patch) | |
tree | ea531549f67b23371b11c1e27361adc6356a9647 /src/operations | |
parent | a2e7f216277bd8cb722b9662ed1d2d44f927de0d (diff) |
no more wildcard notifications
Diffstat (limited to 'src/operations')
-rw-r--r-- | src/operations/pay.ts | 2 | ||||
-rw-r--r-- | src/operations/reserves.ts | 5 | ||||
-rw-r--r-- | src/operations/versions.ts | 4 | ||||
-rw-r--r-- | src/operations/withdraw.ts | 5 |
4 files changed, 7 insertions, 9 deletions
diff --git a/src/operations/pay.ts b/src/operations/pay.ts index 7faace46e..a16190743 100644 --- a/src/operations/pay.ts +++ b/src/operations/pay.ts @@ -1118,7 +1118,7 @@ export async function refuseProposal( ); if (success) { ws.notify({ - type: NotificationType.Wildcard, + type: NotificationType.ProposalRefused, }); } } diff --git a/src/operations/reserves.ts b/src/operations/reserves.ts index 7dd97decb..365d6e221 100644 --- a/src/operations/reserves.ts +++ b/src/operations/reserves.ts @@ -336,7 +336,7 @@ async function registerReserveWithBank( r.retryInfo = initRetryInfo(); return r; }); - ws.notify({ type: NotificationType.Wildcard }); + ws.notify({ type: NotificationType.ReserveRegisteredWithBank }); return processReserveBankStatus(ws, reservePub); } @@ -377,8 +377,6 @@ async function processReserveBankStatusImpl( await statusResp.json(), ); - ws.notify({ type: NotificationType.Wildcard }); - if (status.selection_done) { if (reserve.reserveStatus === ReserveRecordStatus.REGISTERING_BANK) { await registerReserveWithBank(ws, reservePub); @@ -420,7 +418,6 @@ async function processReserveBankStatusImpl( }); await incrementReserveRetry(ws, reservePub, undefined); } - ws.notify({ type: NotificationType.Wildcard }); } async function incrementReserveRetry( diff --git a/src/operations/versions.ts b/src/operations/versions.ts index cfe6ed49f..31c4921c6 100644 --- a/src/operations/versions.ts +++ b/src/operations/versions.ts @@ -19,14 +19,14 @@ * * Uses libtool's current:revision:age versioning. */ -export const WALLET_EXCHANGE_PROTOCOL_VERSION = "7:0:0"; +export const WALLET_EXCHANGE_PROTOCOL_VERSION = "8:0:0"; /** * Protocol version spoken with the merchant. * * Uses libtool's current:revision:age versioning. */ -export const WALLET_MERCHANT_PROTOCOL_VERSION = "0:0:0"; +export const WALLET_MERCHANT_PROTOCOL_VERSION = "1:0:0"; /** * Cache breaker that is appended to queries such as /keys and /wire diff --git a/src/operations/withdraw.ts b/src/operations/withdraw.ts index ff618b894..19b470e83 100644 --- a/src/operations/withdraw.ts +++ b/src/operations/withdraw.ts @@ -489,7 +489,6 @@ export async function selectWithdrawalDenoms( } } while (selectedDenoms.selectedDenoms.length > 0 && !allValid); - if (Amounts.cmp(selectedDenoms.totalWithdrawCost, amount) > 0) { throw Error("Bug: withdrawal coin selection is wrong"); } @@ -515,7 +514,9 @@ async function incrementWithdrawalRetry( wsr.lastError = err; await tx.put(Stores.withdrawalGroups, wsr); }); - ws.notify({ type: NotificationType.WithdrawOperationError }); + if (err) { + ws.notify({ type: NotificationType.WithdrawOperationError, error: err }); + } } export async function processWithdrawGroup( |