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.tsconfig = tsconfig
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

View File

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

View File

@ -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(),

View File

@ -352,6 +352,7 @@ export interface PreCoinRecord {
coinPub: string;
coinPriv: string;
reservePub: string;
denomPubHash: string;
denomPub: string;
blindingKey: string;
withdrawSig: string;
@ -449,6 +450,11 @@ export interface CoinRecord {
*/
denomPub: string;
/**
* Hash of the public key that signs the coin.
*/
denomPubHash: string;
/**
* 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."
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 ""

View File

@ -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 ""

View File

@ -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 ""

View File

@ -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 ""

View File

@ -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 ""

View File

@ -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 ""

View File

@ -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)",

View File

@ -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,