aboutsummaryrefslogtreecommitdiff
path: root/extension/background/wallet.ts
diff options
context:
space:
mode:
Diffstat (limited to 'extension/background/wallet.ts')
-rw-r--r--extension/background/wallet.ts14
1 files changed, 8 insertions, 6 deletions
diff --git a/extension/background/wallet.ts b/extension/background/wallet.ts
index 96a2ab220..dd2ceca7d 100644
--- a/extension/background/wallet.ts
+++ b/extension/background/wallet.ts
@@ -185,12 +185,14 @@ function withdrawPrepare(db: IDBDatabase, denom, reserve): Promise<PreCoin> {
let withdrawFee = new Amount(denom.fee_withdraw);
// Signature
- let withdrawRequest = new WithdrawRequestPS();
- withdrawRequest.set("reserve_pub", reservePub);
- withdrawRequest.set("amount_with_fee", amountWithFee.toNbo());
- withdrawRequest.set("withdraw_fee", withdrawFee.toNbo());
- withdrawRequest.set("h_denomination_pub", denomPub.encode().hash());
- withdrawRequest.set("h_coin_envelope", ev.hash());
+ let withdrawRequest = new WithdrawRequestPS({
+ reserve_pub: reservePub,
+ amount_with_fee: amountWithFee.toNbo(),
+ withdraw_fee: withdrawFee.toNbo(),
+ h_denomination_pub: denomPub.encode().hash(),
+ h_coin_envelope: ev.hash()
+ });
+
console.log("about to sign");
var sig = eddsaSign(withdrawRequest.toPurpose(), reservePriv);
console.log("signed");