adjust to exchange protocol changes

This commit is contained in:
Florian Dold 2019-05-08 07:01:17 +02:00
parent ab2726848a
commit d25628ab02
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
12 changed files with 50 additions and 37 deletions

View File

@ -358,5 +358,5 @@ function po2js() {
exports.srcdist = srcdist exports.srcdist = srcdist
exports.tsconfig = tsconfig exports.tsconfig = tsconfig
exports.po2js = po2js exports.po2js = po2js
exports.stable = gulp.series(tsconfig, compile_prod, dist_prod, package_stable) exports.stable = gulp.series(tsconfig, manifest_stable, compile_prod, dist_prod, package_stable)
exports.default = exports.stable exports.default = exports.stable

View File

@ -4,7 +4,7 @@
"name": "GNU Taler Wallet (git)", "name": "GNU Taler Wallet (git)",
"description": "Privacy preserving and transparent payments", "description": "Privacy preserving and transparent payments",
"author": "GNU Taler Developers", "author": "GNU Taler Developers",
"version": "0.6.62", "version": "0.6.65",
"version_name": "0.5.1", "version_name": "0.5.1",
"minimum_chrome_version": "51", "minimum_chrome_version": "51",

View File

@ -96,11 +96,13 @@ namespace RpcFunctions {
amountWithFee.add(new native.Amount(denom.feeWithdraw)); amountWithFee.add(new native.Amount(denom.feeWithdraw));
const withdrawFee = new native.Amount(denom.feeWithdraw); const withdrawFee = new native.Amount(denom.feeWithdraw);
const denomPubHash = denomPub.encode().hash();
// Signature // Signature
const withdrawRequest = new native.WithdrawRequestPS({ const withdrawRequest = new native.WithdrawRequestPS({
amount_with_fee: amountWithFee.toNbo(), amount_with_fee: amountWithFee.toNbo(),
h_coin_envelope: ev.hash(), h_coin_envelope: ev.hash(),
h_denomination_pub: denomPub.encode().hash(), h_denomination_pub: denomPubHash,
reserve_pub: reservePub, reserve_pub: reservePub,
withdraw_fee: withdrawFee.toNbo(), withdraw_fee: withdrawFee.toNbo(),
}); });
@ -113,7 +115,8 @@ namespace RpcFunctions {
coinPriv: coinPriv.toCrock(), coinPriv: coinPriv.toCrock(),
coinPub: coinPub.toCrock(), coinPub: coinPub.toCrock(),
coinValue: denom.value, coinValue: denom.value,
denomPub: denomPub.encode().toCrock(), denomPub: denomPub.toCrock(),
denomPubHash: denomPubHash.toCrock(),
exchangeBaseUrl: reserve.exchange_base_url, exchangeBaseUrl: reserve.exchange_base_url,
isFromTip: false, isFromTip: false,
reservePub: reservePub.toCrock(), reservePub: reservePub.toCrock(),

View File

@ -352,6 +352,7 @@ export interface PreCoinRecord {
coinPub: string; coinPub: string;
coinPriv: string; coinPriv: string;
reservePub: string; reservePub: string;
denomPubHash: string;
denomPub: string; denomPub: string;
blindingKey: string; blindingKey: string;
withdrawSig: string; withdrawSig: string;
@ -449,6 +450,11 @@ export interface CoinRecord {
*/ */
denomPub: string; denomPub: string;
/**
* Hash of the public key that signs the coin.
*/
denomPubHash: string;
/** /**
* Unblinded signature by the exchange. * Unblinded signature by the exchange.
*/ */

View File

@ -212,30 +212,30 @@ msgstr ""
msgid "You are about to withdraw %1$s from your bank account into your wallet." msgid "You are about to withdraw %1$s from your bank account into your wallet."
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:455 #: src/webex/pages/confirm-create-reserve.tsx:459
#, c-format #, c-format
msgid "" msgid ""
"Oops, something went wrong. The wallet responded with error status (%1$s)." "Oops, something went wrong. The wallet responded with error status (%1$s)."
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:464 #: src/webex/pages/confirm-create-reserve.tsx:468
#, c-format #, c-format
msgid "Checking URL, please wait ..." msgid "Checking URL, please wait ..."
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:478 #: src/webex/pages/confirm-create-reserve.tsx:482
#, c-format #, c-format
msgid "Can't parse amount: %1$s" msgid "Can't parse amount: %1$s"
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:485 #: src/webex/pages/confirm-create-reserve.tsx:489
#, c-format #, c-format
msgid "Can't parse wire_types: %1$s" msgid "Can't parse wire_types: %1$s"
msgstr "" msgstr ""
#. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-# #. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#
#. TODO:generic error reporting function or component. #. 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 #, c-format
msgid "Fatal error: \"%1$s\"." msgid "Fatal error: \"%1$s\"."
msgstr "" msgstr ""

View File

@ -212,30 +212,30 @@ msgstr ""
msgid "You are about to withdraw %1$s from your bank account into your wallet." msgid "You are about to withdraw %1$s from your bank account into your wallet."
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:455 #: src/webex/pages/confirm-create-reserve.tsx:459
#, c-format #, c-format
msgid "" msgid ""
"Oops, something went wrong. The wallet responded with error status (%1$s)." "Oops, something went wrong. The wallet responded with error status (%1$s)."
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:464 #: src/webex/pages/confirm-create-reserve.tsx:468
#, c-format #, c-format
msgid "Checking URL, please wait ..." msgid "Checking URL, please wait ..."
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:478 #: src/webex/pages/confirm-create-reserve.tsx:482
#, c-format #, c-format
msgid "Can't parse amount: %1$s" msgid "Can't parse amount: %1$s"
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:485 #: src/webex/pages/confirm-create-reserve.tsx:489
#, c-format #, c-format
msgid "Can't parse wire_types: %1$s" msgid "Can't parse wire_types: %1$s"
msgstr "" msgstr ""
#. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-# #. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#
#. TODO:generic error reporting function or component. #. 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 #, c-format
msgid "Fatal error: \"%1$s\"." msgid "Fatal error: \"%1$s\"."
msgstr "" msgstr ""

View File

@ -212,30 +212,30 @@ msgstr ""
msgid "You are about to withdraw %1$s from your bank account into your wallet." msgid "You are about to withdraw %1$s from your bank account into your wallet."
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:455 #: src/webex/pages/confirm-create-reserve.tsx:459
#, c-format #, c-format
msgid "" msgid ""
"Oops, something went wrong. The wallet responded with error status (%1$s)." "Oops, something went wrong. The wallet responded with error status (%1$s)."
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:464 #: src/webex/pages/confirm-create-reserve.tsx:468
#, c-format #, c-format
msgid "Checking URL, please wait ..." msgid "Checking URL, please wait ..."
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:478 #: src/webex/pages/confirm-create-reserve.tsx:482
#, c-format #, c-format
msgid "Can't parse amount: %1$s" msgid "Can't parse amount: %1$s"
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:485 #: src/webex/pages/confirm-create-reserve.tsx:489
#, c-format #, c-format
msgid "Can't parse wire_types: %1$s" msgid "Can't parse wire_types: %1$s"
msgstr "" msgstr ""
#. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-# #. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#
#. TODO:generic error reporting function or component. #. 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 #, c-format
msgid "Fatal error: \"%1$s\"." msgid "Fatal error: \"%1$s\"."
msgstr "" msgstr ""

View File

@ -212,30 +212,30 @@ msgstr ""
msgid "You are about to withdraw %1$s from your bank account into your wallet." msgid "You are about to withdraw %1$s from your bank account into your wallet."
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:455 #: src/webex/pages/confirm-create-reserve.tsx:459
#, c-format #, c-format
msgid "" msgid ""
"Oops, something went wrong. The wallet responded with error status (%1$s)." "Oops, something went wrong. The wallet responded with error status (%1$s)."
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:464 #: src/webex/pages/confirm-create-reserve.tsx:468
#, c-format #, c-format
msgid "Checking URL, please wait ..." msgid "Checking URL, please wait ..."
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:478 #: src/webex/pages/confirm-create-reserve.tsx:482
#, c-format #, c-format
msgid "Can't parse amount: %1$s" msgid "Can't parse amount: %1$s"
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:485 #: src/webex/pages/confirm-create-reserve.tsx:489
#, c-format #, c-format
msgid "Can't parse wire_types: %1$s" msgid "Can't parse wire_types: %1$s"
msgstr "" msgstr ""
#. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-# #. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#
#. TODO:generic error reporting function or component. #. 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 #, c-format
msgid "Fatal error: \"%1$s\"." msgid "Fatal error: \"%1$s\"."
msgstr "" msgstr ""

View File

@ -216,30 +216,30 @@ msgstr ""
"Du är på väg att ta ut\n" "Du är på väg att ta ut\n"
" %1$s från ditt bankkonto till din plånbok.\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 #, fuzzy, c-format
msgid "" msgid ""
"Oops, something went wrong. The wallet responded with error status (%1$s)." "Oops, something went wrong. The wallet responded with error status (%1$s)."
msgstr "plånboken" msgstr "plånboken"
#: src/webex/pages/confirm-create-reserve.tsx:464 #: src/webex/pages/confirm-create-reserve.tsx:468
#, c-format #, c-format
msgid "Checking URL, please wait ..." msgid "Checking URL, please wait ..."
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:478 #: src/webex/pages/confirm-create-reserve.tsx:482
#, c-format #, c-format
msgid "Can't parse amount: %1$s" msgid "Can't parse amount: %1$s"
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:485 #: src/webex/pages/confirm-create-reserve.tsx:489
#, c-format #, c-format
msgid "Can't parse wire_types: %1$s" msgid "Can't parse wire_types: %1$s"
msgstr "" msgstr ""
#. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-# #. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#
#. TODO:generic error reporting function or component. #. 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 #, c-format
msgid "Fatal error: \"%1$s\"." msgid "Fatal error: \"%1$s\"."
msgstr "" msgstr ""

View File

@ -212,30 +212,30 @@ msgstr ""
msgid "You are about to withdraw %1$s from your bank account into your wallet." msgid "You are about to withdraw %1$s from your bank account into your wallet."
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:455 #: src/webex/pages/confirm-create-reserve.tsx:459
#, c-format #, c-format
msgid "" msgid ""
"Oops, something went wrong. The wallet responded with error status (%1$s)." "Oops, something went wrong. The wallet responded with error status (%1$s)."
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:464 #: src/webex/pages/confirm-create-reserve.tsx:468
#, c-format #, c-format
msgid "Checking URL, please wait ..." msgid "Checking URL, please wait ..."
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:478 #: src/webex/pages/confirm-create-reserve.tsx:482
#, c-format #, c-format
msgid "Can't parse amount: %1$s" msgid "Can't parse amount: %1$s"
msgstr "" msgstr ""
#: src/webex/pages/confirm-create-reserve.tsx:485 #: src/webex/pages/confirm-create-reserve.tsx:489
#, c-format #, c-format
msgid "Can't parse wire_types: %1$s" msgid "Can't parse wire_types: %1$s"
msgstr "" msgstr ""
#. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-# #. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#
#. TODO:generic error reporting function or component. #. 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 #, c-format
msgid "Fatal error: \"%1$s\"." msgid "Fatal error: \"%1$s\"."
msgstr "" msgstr ""

View File

@ -43,6 +43,7 @@ function fakeCwd(current: string, value: string, feeDeposit: string): types.Coin
coinPub: "(mock)", coinPub: "(mock)",
currentAmount: a(current), currentAmount: a(current),
denomPub: "(mock)", denomPub: "(mock)",
denomPubHash: "(mock)",
denomSig: "(mock)", denomSig: "(mock)",
exchangeBaseUrl: "(mock)", exchangeBaseUrl: "(mock)",
reservePub: "(mock)", reservePub: "(mock)",

View File

@ -124,7 +124,7 @@ interface SpeculativePayData {
* *
* Uses libtool's current:revision:age versioning. * 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[] = [ const builtinCurrencies: CurrencyRecord[] = [
{ {
@ -1198,7 +1198,7 @@ export class Wallet {
private async withdrawExecute(pc: PreCoinRecord): Promise<CoinRecord> { private async withdrawExecute(pc: PreCoinRecord): Promise<CoinRecord> {
const wd: any = {}; const wd: any = {};
wd.denom_pub = pc.denomPub; wd.denom_pub_hash = pc.denomPubHash;
wd.reserve_pub = pc.reservePub; wd.reserve_pub = pc.reservePub;
wd.reserve_sig = pc.withdrawSig; wd.reserve_sig = pc.withdrawSig;
wd.coin_ev = pc.coinEv; wd.coin_ev = pc.coinEv;
@ -1221,6 +1221,7 @@ export class Wallet {
coinPub: pc.coinPub, coinPub: pc.coinPub,
currentAmount: pc.coinValue, currentAmount: pc.coinValue,
denomPub: pc.denomPub, denomPub: pc.denomPub,
denomPubHash: pc.denomPubHash,
denomSig, denomSig,
exchangeBaseUrl: pc.exchangeBaseUrl, exchangeBaseUrl: pc.exchangeBaseUrl,
reservePub: pc.reservePub, reservePub: pc.reservePub,
@ -2031,7 +2032,7 @@ export class Wallet {
const meltReq = { const meltReq = {
coin_pub: coin.coinPub, coin_pub: coin.coinPub,
confirm_sig: refreshSession.confirmSig, confirm_sig: refreshSession.confirmSig,
denom_pub: coin.denomPub, denom_pub_hash: coin.denomPubHash,
denom_sig: coin.denomSig, denom_sig: coin.denomSig,
rc: refreshSession.hash, rc: refreshSession.hash,
value_with_fee: refreshSession.valueWithFee, value_with_fee: refreshSession.valueWithFee,
@ -2137,6 +2138,7 @@ export class Wallet {
coinPub: pc.publicKey, coinPub: pc.publicKey,
currentAmount: denom.value, currentAmount: denom.value,
denomPub: denom.denomPub, denomPub: denom.denomPub,
denomPubHash: denom.denomPubHash,
denomSig, denomSig,
exchangeBaseUrl: refreshSession.exchangeBaseUrl, exchangeBaseUrl: refreshSession.exchangeBaseUrl,
reservePub: undefined, reservePub: undefined,
@ -2822,6 +2824,7 @@ export class Wallet {
coinPub: planchet.coinPub, coinPub: planchet.coinPub,
coinValue: planchet.coinValue, coinValue: planchet.coinValue,
denomPub: planchet.denomPub, denomPub: planchet.denomPub,
denomPubHash: planchet.denomPubHash,
exchangeBaseUrl: tipRecord.exchangeUrl, exchangeBaseUrl: tipRecord.exchangeUrl,
isFromTip: true, isFromTip: true,
reservePub: response.reserve_pub, reservePub: response.reserve_pub,