Skip to content

Commit 1f6cdfb

Browse files
committed
docs(root): apply suggestions from code review
BTC-0 Co-authored-by: David Kaplan <[email protected]> TICKET: BTC-0
1 parent 6358083 commit 1f6cdfb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/ts/btc/omni/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ async function getWallet() {
2020
* Send an omni asset to a receiver. This function is used when you have sent an omni asset to a BitGo BTC wallet
2121
* and need to manually recover it
2222
* This function assumes that:
23-
* - Your address has a single unspent that is large enough to cover the transaction
24-
* - The receiver address is a legacy address, otherwise the transaction will not be recognized by the omni explorer
23+
* - Your address has at least one unspent that is large enough to cover the transaction
24+
* - The receiver address is a legacy or wrapped segwit ([reference](https://developers.bitgo.com/coins/address-types)) address, otherwise the transaction will not be recognized by the omni explorer.
2525
* @param wallet - The wallet to send the omni asset from.
2626
* @param receiver - The address to send the omni asset to (legacy address required).
2727
* @param sender - The address to send the omni asset from (legacy address required).
@@ -44,9 +44,9 @@ async function sendOmniAsset(
4444
assetId = 31,
4545
feeRateSatPerKB = 20_000
4646
) {
47-
if (!['1', 'n', 'm'].includes(receiver.slice(0, 1))) {
47+
if (!['1', '3', 'n', 'm'].includes(receiver.slice(0, 1))) {
4848
throw new Error(
49-
'Omni has only been verified to work with legacy addresses - use other address formats at your own risk'
49+
'Omni has only been verified to work with legacy and wrapped segwit addresses - use other address formats at your own risk'
5050
);
5151
}
5252

0 commit comments

Comments
 (0)