diff --git a/lib/client/api.js b/lib/client/api.js index c1750f9..e9f7ac7 100644 --- a/lib/client/api.js +++ b/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; };