diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/crypto/cryptoWorker.ts | 7 | ||||
-rw-r--r-- | src/dbTypes.ts | 6 | ||||
-rw-r--r-- | src/i18n/de.po | 10 | ||||
-rw-r--r-- | src/i18n/en-US.po | 10 | ||||
-rw-r--r-- | src/i18n/fr.po | 10 | ||||
-rw-r--r-- | src/i18n/it.po | 10 | ||||
-rw-r--r-- | src/i18n/sv.po | 10 | ||||
-rw-r--r-- | src/i18n/taler-wallet-webex.pot | 10 | ||||
-rw-r--r-- | src/wallet-test.ts | 1 | ||||
-rw-r--r-- | src/wallet.ts | 9 |
10 files changed, 48 insertions, 35 deletions
diff --git a/src/crypto/cryptoWorker.ts b/src/crypto/cryptoWorker.ts index 11b21190d..5013e3acf 100644 --- a/src/crypto/cryptoWorker.ts +++ b/src/crypto/cryptoWorker.ts @@ -96,11 +96,13 @@ namespace RpcFunctions { amountWithFee.add(new native.Amount(denom.feeWithdraw)); const withdrawFee = new native.Amount(denom.feeWithdraw); + const denomPubHash = denomPub.encode().hash(); + // Signature const withdrawRequest = new native.WithdrawRequestPS({ amount_with_fee: amountWithFee.toNbo(), h_coin_envelope: ev.hash(), - h_denomination_pub: denomPub.encode().hash(), + h_denomination_pub: denomPubHash, reserve_pub: reservePub, withdraw_fee: withdrawFee.toNbo(), }); @@ -113,7 +115,8 @@ namespace RpcFunctions { coinPriv: coinPriv.toCrock(), coinPub: coinPub.toCrock(), coinValue: denom.value, - denomPub: denomPub.encode().toCrock(), + denomPub: denomPub.toCrock(), + denomPubHash: denomPubHash.toCrock(), exchangeBaseUrl: reserve.exchange_base_url, isFromTip: false, reservePub: reservePub.toCrock(), diff --git a/src/dbTypes.ts b/src/dbTypes.ts index 3cb9a0d32..98a0fc0e0 100644 --- a/src/dbTypes.ts +++ b/src/dbTypes.ts @@ -352,6 +352,7 @@ export interface PreCoinRecord { coinPub: string; coinPriv: string; reservePub: string; + denomPubHash: string; denomPub: string; blindingKey: string; withdrawSig: string; @@ -450,6 +451,11 @@ export interface CoinRecord { denomPub: string; /** + * Hash of the public key that signs the coin. + */ + denomPubHash: string; + + /** * Unblinded signature by the exchange. */ denomSig: string; diff --git a/src/i18n/de.po b/src/i18n/de.po index 70d7069cd..6bfda6706 100644 --- a/src/i18n/de.po +++ b/src/i18n/de.po @@ -212,30 +212,30 @@ msgstr "" msgid "You are about to withdraw %1$s from your bank account into your wallet." msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:455 +#: src/webex/pages/confirm-create-reserve.tsx:459 #, c-format msgid "" "Oops, something went wrong. The wallet responded with error status (%1$s)." msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:464 +#: src/webex/pages/confirm-create-reserve.tsx:468 #, c-format msgid "Checking URL, please wait ..." msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:478 +#: src/webex/pages/confirm-create-reserve.tsx:482 #, c-format msgid "Can't parse amount: %1$s" msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:485 +#: src/webex/pages/confirm-create-reserve.tsx:489 #, c-format msgid "Can't parse wire_types: %1$s" msgstr "" #. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-# #. TODO:generic error reporting function or component. -#: src/webex/pages/confirm-create-reserve.tsx:515 src/webex/pages/tip.tsx:180 +#: src/webex/pages/confirm-create-reserve.tsx:519 src/webex/pages/tip.tsx:180 #, c-format msgid "Fatal error: \"%1$s\"." msgstr "" diff --git a/src/i18n/en-US.po b/src/i18n/en-US.po index 2bd3e0f59..6d57e0ea2 100644 --- a/src/i18n/en-US.po +++ b/src/i18n/en-US.po @@ -212,30 +212,30 @@ msgstr "" msgid "You are about to withdraw %1$s from your bank account into your wallet." msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:455 +#: src/webex/pages/confirm-create-reserve.tsx:459 #, c-format msgid "" "Oops, something went wrong. The wallet responded with error status (%1$s)." msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:464 +#: src/webex/pages/confirm-create-reserve.tsx:468 #, c-format msgid "Checking URL, please wait ..." msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:478 +#: src/webex/pages/confirm-create-reserve.tsx:482 #, c-format msgid "Can't parse amount: %1$s" msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:485 +#: src/webex/pages/confirm-create-reserve.tsx:489 #, c-format msgid "Can't parse wire_types: %1$s" msgstr "" #. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-# #. TODO:generic error reporting function or component. -#: src/webex/pages/confirm-create-reserve.tsx:515 src/webex/pages/tip.tsx:180 +#: src/webex/pages/confirm-create-reserve.tsx:519 src/webex/pages/tip.tsx:180 #, c-format msgid "Fatal error: \"%1$s\"." msgstr "" diff --git a/src/i18n/fr.po b/src/i18n/fr.po index e62328a9c..e7615e41c 100644 --- a/src/i18n/fr.po +++ b/src/i18n/fr.po @@ -212,30 +212,30 @@ msgstr "" msgid "You are about to withdraw %1$s from your bank account into your wallet." msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:455 +#: src/webex/pages/confirm-create-reserve.tsx:459 #, c-format msgid "" "Oops, something went wrong. The wallet responded with error status (%1$s)." msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:464 +#: src/webex/pages/confirm-create-reserve.tsx:468 #, c-format msgid "Checking URL, please wait ..." msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:478 +#: src/webex/pages/confirm-create-reserve.tsx:482 #, c-format msgid "Can't parse amount: %1$s" msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:485 +#: src/webex/pages/confirm-create-reserve.tsx:489 #, c-format msgid "Can't parse wire_types: %1$s" msgstr "" #. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-# #. TODO:generic error reporting function or component. -#: src/webex/pages/confirm-create-reserve.tsx:515 src/webex/pages/tip.tsx:180 +#: src/webex/pages/confirm-create-reserve.tsx:519 src/webex/pages/tip.tsx:180 #, c-format msgid "Fatal error: \"%1$s\"." msgstr "" diff --git a/src/i18n/it.po b/src/i18n/it.po index e62328a9c..e7615e41c 100644 --- a/src/i18n/it.po +++ b/src/i18n/it.po @@ -212,30 +212,30 @@ msgstr "" msgid "You are about to withdraw %1$s from your bank account into your wallet." msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:455 +#: src/webex/pages/confirm-create-reserve.tsx:459 #, c-format msgid "" "Oops, something went wrong. The wallet responded with error status (%1$s)." msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:464 +#: src/webex/pages/confirm-create-reserve.tsx:468 #, c-format msgid "Checking URL, please wait ..." msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:478 +#: src/webex/pages/confirm-create-reserve.tsx:482 #, c-format msgid "Can't parse amount: %1$s" msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:485 +#: src/webex/pages/confirm-create-reserve.tsx:489 #, c-format msgid "Can't parse wire_types: %1$s" msgstr "" #. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-# #. TODO:generic error reporting function or component. -#: src/webex/pages/confirm-create-reserve.tsx:515 src/webex/pages/tip.tsx:180 +#: src/webex/pages/confirm-create-reserve.tsx:519 src/webex/pages/tip.tsx:180 #, c-format msgid "Fatal error: \"%1$s\"." msgstr "" diff --git a/src/i18n/sv.po b/src/i18n/sv.po index 36cde50c7..1b99a13a0 100644 --- a/src/i18n/sv.po +++ b/src/i18n/sv.po @@ -216,30 +216,30 @@ msgstr "" "Du är på väg att ta ut\n" " %1$s från ditt bankkonto till din plånbok.\n" -#: src/webex/pages/confirm-create-reserve.tsx:455 +#: src/webex/pages/confirm-create-reserve.tsx:459 #, fuzzy, c-format msgid "" "Oops, something went wrong. The wallet responded with error status (%1$s)." msgstr "plånboken" -#: src/webex/pages/confirm-create-reserve.tsx:464 +#: src/webex/pages/confirm-create-reserve.tsx:468 #, c-format msgid "Checking URL, please wait ..." msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:478 +#: src/webex/pages/confirm-create-reserve.tsx:482 #, c-format msgid "Can't parse amount: %1$s" msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:485 +#: src/webex/pages/confirm-create-reserve.tsx:489 #, c-format msgid "Can't parse wire_types: %1$s" msgstr "" #. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-# #. TODO:generic error reporting function or component. -#: src/webex/pages/confirm-create-reserve.tsx:515 src/webex/pages/tip.tsx:180 +#: src/webex/pages/confirm-create-reserve.tsx:519 src/webex/pages/tip.tsx:180 #, c-format msgid "Fatal error: \"%1$s\"." msgstr "" diff --git a/src/i18n/taler-wallet-webex.pot b/src/i18n/taler-wallet-webex.pot index e62328a9c..e7615e41c 100644 --- a/src/i18n/taler-wallet-webex.pot +++ b/src/i18n/taler-wallet-webex.pot @@ -212,30 +212,30 @@ msgstr "" msgid "You are about to withdraw %1$s from your bank account into your wallet." msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:455 +#: src/webex/pages/confirm-create-reserve.tsx:459 #, c-format msgid "" "Oops, something went wrong. The wallet responded with error status (%1$s)." msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:464 +#: src/webex/pages/confirm-create-reserve.tsx:468 #, c-format msgid "Checking URL, please wait ..." msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:478 +#: src/webex/pages/confirm-create-reserve.tsx:482 #, c-format msgid "Can't parse amount: %1$s" msgstr "" -#: src/webex/pages/confirm-create-reserve.tsx:485 +#: src/webex/pages/confirm-create-reserve.tsx:489 #, c-format msgid "Can't parse wire_types: %1$s" msgstr "" #. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-# #. TODO:generic error reporting function or component. -#: src/webex/pages/confirm-create-reserve.tsx:515 src/webex/pages/tip.tsx:180 +#: src/webex/pages/confirm-create-reserve.tsx:519 src/webex/pages/tip.tsx:180 #, c-format msgid "Fatal error: \"%1$s\"." msgstr "" diff --git a/src/wallet-test.ts b/src/wallet-test.ts index 2b11811f1..bd0925ed0 100644 --- a/src/wallet-test.ts +++ b/src/wallet-test.ts @@ -43,6 +43,7 @@ function fakeCwd(current: string, value: string, feeDeposit: string): types.Coin coinPub: "(mock)", currentAmount: a(current), denomPub: "(mock)", + denomPubHash: "(mock)", denomSig: "(mock)", exchangeBaseUrl: "(mock)", reservePub: "(mock)", diff --git a/src/wallet.ts b/src/wallet.ts index 58c69d79c..f5a1bd43c 100644 --- a/src/wallet.ts +++ b/src/wallet.ts @@ -124,7 +124,7 @@ interface SpeculativePayData { * * Uses libtool's current:revision:age versioning. */ -export const WALLET_PROTOCOL_VERSION = "2:0:0"; +export const WALLET_PROTOCOL_VERSION = "3:0:0"; const builtinCurrencies: CurrencyRecord[] = [ { @@ -1198,7 +1198,7 @@ export class Wallet { private async withdrawExecute(pc: PreCoinRecord): Promise<CoinRecord> { const wd: any = {}; - wd.denom_pub = pc.denomPub; + wd.denom_pub_hash = pc.denomPubHash; wd.reserve_pub = pc.reservePub; wd.reserve_sig = pc.withdrawSig; wd.coin_ev = pc.coinEv; @@ -1221,6 +1221,7 @@ export class Wallet { coinPub: pc.coinPub, currentAmount: pc.coinValue, denomPub: pc.denomPub, + denomPubHash: pc.denomPubHash, denomSig, exchangeBaseUrl: pc.exchangeBaseUrl, reservePub: pc.reservePub, @@ -2031,7 +2032,7 @@ export class Wallet { const meltReq = { coin_pub: coin.coinPub, confirm_sig: refreshSession.confirmSig, - denom_pub: coin.denomPub, + denom_pub_hash: coin.denomPubHash, denom_sig: coin.denomSig, rc: refreshSession.hash, value_with_fee: refreshSession.valueWithFee, @@ -2137,6 +2138,7 @@ export class Wallet { coinPub: pc.publicKey, currentAmount: denom.value, denomPub: denom.denomPub, + denomPubHash: denom.denomPubHash, denomSig, exchangeBaseUrl: refreshSession.exchangeBaseUrl, reservePub: undefined, @@ -2822,6 +2824,7 @@ export class Wallet { coinPub: planchet.coinPub, coinValue: planchet.coinValue, denomPub: planchet.denomPub, + denomPubHash: planchet.denomPubHash, exchangeBaseUrl: tipRecord.exchangeUrl, isFromTip: true, reservePub: response.reserve_pub, |