MCPcopy
hub / github.com/bitpay/wallet / publishAndSign

Method publishAndSign

src/providers/wallet/wallet.ts:1799–1808  ·  view source on GitHub ↗
(wallet, txp)

Source from the content-addressed store, hash-verified

1797 }
1798
1799 public async publishAndSign(wallet, txp): Promise<any> {
1800 const password = await this.prepare(wallet);
1801 // Already published?
1802 if (txp.status == 'pending') {
1803 return this.signAndBroadcast(wallet, txp, password);
1804 }
1805 this.onGoingProcessProvider.set('sendingTx');
1806 const publishedTxp = await this.publishTx(wallet, txp);
1807 return this.signAndBroadcast(wallet, publishedTxp, password);
1808 }
1809
1810 public signMultipleTxps(wallet, txps: any[]): Promise<any> {
1811 [].concat(txps);

Callers 1

wallet.spec.tsFile · 0.45

Calls 4

prepareMethod · 0.95
signAndBroadcastMethod · 0.95
publishTxMethod · 0.95
setMethod · 0.65

Tested by

no test coverage detected