From bf43491ef4acebe58574883fc45e72d0415dc860 Mon Sep 17 00:00:00 2001 From: highlander Date: Sun, 5 Feb 2023 21:22:10 -0500 Subject: [PATCH] fix BCH --- packages/keepkey-sdk-server/src/controllers/utxo.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/keepkey-sdk-server/src/controllers/utxo.ts b/packages/keepkey-sdk-server/src/controllers/utxo.ts index c50e0011a..59a00170a 100644 --- a/packages/keepkey-sdk-server/src/controllers/utxo.ts +++ b/packages/keepkey-sdk-server/src/controllers/utxo.ts @@ -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 + } } }