Browse Source

use getProposalHash in client

activeAddress
Ivan Socolsky 10 years ago
parent
commit
5c765600b6
  1. 4
      lib/client/api.js

4
lib/client/api.js

@ -18,8 +18,8 @@ var BASE_URL = 'http://localhost:3001/copay/api';
var WALLET_CRITICAL_DATA = ['xPrivKey', 'm', 'publicKeyRing'];
function _createProposalOpts(opts, signingKey) {
var msg = opts.toAddress + '|' + opts.amount + '|' + opts.message;
opts.proposalSignature = WalletUtils.signMessage(msg, signingKey);
var hash = WalletUtils.getProposalHash(opts.toAddress, opts.amount, opts.message);
opts.proposalSignature = WalletUtils.signMessage(hash, signingKey);
return opts;
};

Loading…
Cancel
Save