Skip to content

Commit

Permalink
fix BCH
Browse files Browse the repository at this point in the history
  • Loading branch information
BitHighlander committed Feb 6, 2023
1 parent 9ba1a4d commit bf43491
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/keepkey-sdk-server/src/controllers/utxo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ export class UtxoController extends ApiController {
}
if (body.vaultAddress) input.vaultAddress = body.vaultAddress
if (body.opReturnData) input.opReturnData = body.opReturnData

for (let i = 0; i < input.outputs.length; i++) {
let output = input.outputs[i]
if (output.address && !output.address.startsWith('bitcoincash:')) {
output.address = 'bitcoincash:' + output.address
if (input.coin === 'BitcoinCash') {
for (let i = 0; i < input.outputs.length; i++) {
let output = input.outputs[i]
if (output.address && !output.address.startsWith('bitcoincash:')) {
output.address = 'bitcoincash:' + output.address
}
}
}

Expand Down

0 comments on commit bf43491

Please sign in to comment.