mirror of
https://github.com/Permissionless-Software-Foundation/psf-memo-client.git
synced 2026-09-21 16:52:02 -07:00
Fix Memo post broadcast to use wallet public sendOpReturn signature
By specifier.
This commit is contained in:
@@ -49,16 +49,13 @@ class MemoPost {
|
|||||||
throw new Error('Memo post requires a wallet.')
|
throw new Error('Memo post requires a wallet.')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Spendable outputs used to pay the transaction fee.
|
// Refresh the wallet's spendable UTXO store so the broadcast has inputs.
|
||||||
const bchUtxos = await this.wallet.getUtxos()
|
await this.wallet.getUtxos()
|
||||||
|
|
||||||
// Broadcast the OP_RETURN transaction with the Memo post prefix.
|
// The wallet's public sendOpReturn(msg, prefix) resolves walletInfo and
|
||||||
const txid = await this.wallet.sendOpReturn(
|
// its own spendable UTXOs internally, so only the message and Memo post
|
||||||
this.wallet.walletInfo,
|
// prefix are passed here.
|
||||||
bchUtxos,
|
const txid = await this.wallet.sendOpReturn(message, MEMO_POST_PREFIX)
|
||||||
message,
|
|
||||||
MEMO_POST_PREFIX
|
|
||||||
)
|
|
||||||
|
|
||||||
// Reflect the new post in the feed once broadcast succeeds.
|
// Reflect the new post in the feed once broadcast succeeds.
|
||||||
this._reflectPost(txid, message)
|
this._reflectPost(txid, message)
|
||||||
|
|||||||
Reference in New Issue
Block a user