Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/utils/cashMethods.js
Show First 20 Lines • Show All 243 Lines • ▼ Show 20 Lines | try { | ||||
script = opReturnObj.script; | script = opReturnObj.script; | ||||
destinationAddress = tokenRecipientAddress; | destinationAddress = tokenRecipientAddress; | ||||
break; | break; | ||||
case 'BURN': | case 'BURN': | ||||
script = generateBurnOpReturn( | script = generateBurnOpReturn( | ||||
tokenUtxosBeingSpent, | tokenUtxosBeingSpent, | ||||
tokenAmount, | tokenAmount, | ||||
); | ); | ||||
destinationAddress = BCH.SLP.Address.toLegacyAddress( | destinationAddress = legacyCashOriginAddress; | ||||
legacyCashOriginAddress, | |||||
); | |||||
break; | break; | ||||
default: | default: | ||||
throw new Error('Invalid token transaction type'); | throw new Error('Invalid token transaction type'); | ||||
} | } | ||||
// OP_RETURN needs to be the first output in the transaction. | // OP_RETURN needs to be the first output in the transaction. | ||||
txBuilder.addOutput(script, 0); | txBuilder.addOutput(script, 0); | ||||
▲ Show 20 Lines • Show All 968 Lines • Show Last 20 Lines |