add paypro to createTx
This commit is contained in:
parent
b57a6ad88e
commit
fc8d9d6f92
|
@ -351,13 +351,13 @@ WalletService.prototype._getBlockExplorer = function(provider, network) {
|
||||||
return this.blockExplorer;
|
return this.blockExplorer;
|
||||||
|
|
||||||
switch (provider) {
|
switch (provider) {
|
||||||
default:
|
default:;
|
||||||
case 'insight':
|
case 'insight':
|
||||||
switch (network) {
|
switch (network) {
|
||||||
default:
|
default:
|
||||||
case 'livenet':
|
case 'livenet':
|
||||||
url = 'https://insight.bitpay.com:443';
|
url = 'https://insight.bitpay.com:443';
|
||||||
break;
|
break;
|
||||||
case 'testnet':
|
case 'testnet':
|
||||||
url = 'https://test-insight.bitpay.com:443'
|
url = 'https://test-insight.bitpay.com:443'
|
||||||
break;
|
break;
|
||||||
|
@ -535,14 +535,14 @@ WalletService.prototype._selectTxInputs = function(txp, cb) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new transaction proposal.
|
* Creates a new transaction proposal.
|
||||||
* @param {Object} opts
|
* @param {Object} opts
|
||||||
* @param {string} opts.toAddress - Destination address.
|
* @param {string} opts.toAddress - Destination address.
|
||||||
* @param {number} opts.amount - Amount to transfer in satoshi.
|
* @param {number} opts.amount - Amount to transfer in satoshi.
|
||||||
* @param {string} opts.message - A message to attach to this transaction.
|
* @param {string} opts.message - A message to attach to this transaction.
|
||||||
* @param {string} opts.proposalSignature - S(toAddress|amount|message). Used by other copayers to verify the proposal.
|
* @param {string} opts.proposalSignature - S(toAddress|amount|message|payProUrl). Used by other copayers to verify the proposal.
|
||||||
|
* @param {string} opts.payProUrl - Options: Paypro URL for peers to verify TX
|
||||||
* @returns {TxProposal} Transaction proposal.
|
* @returns {TxProposal} Transaction proposal.
|
||||||
*/
|
*/
|
||||||
WalletService.prototype.createTx = function(opts, cb) {
|
WalletService.prototype.createTx = function(opts, cb) {
|
||||||
|
@ -585,6 +585,7 @@ WalletService.prototype.createTx = function(opts, cb) {
|
||||||
amount: opts.amount,
|
amount: opts.amount,
|
||||||
message: opts.message,
|
message: opts.message,
|
||||||
proposalSignature: opts.proposalSignature,
|
proposalSignature: opts.proposalSignature,
|
||||||
|
payProUrl: opts.payProUrl,
|
||||||
changeAddress: changeAddress,
|
changeAddress: changeAddress,
|
||||||
requiredSignatures: wallet.m,
|
requiredSignatures: wallet.m,
|
||||||
requiredRejections: Math.min(wallet.m, wallet.n - wallet.m + 1),
|
requiredRejections: Math.min(wallet.m, wallet.n - wallet.m + 1),
|
||||||
|
|
Loading…
Reference in New Issue