Skip to content

Commit c2a341a

Browse files
authored
Merge pull request #3687 from BitGo/bg-79393-sol-approval-fix
fix(sdk-core): do not treat sol as a utxo-coin for approval
2 parents e8bf1cc + a1cc144 commit c2a341a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

modules/sdk-core/src/bitgo/pendingApproval/pendingApproval.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*/
44
import * as _ from 'lodash';
55
import * as common from '../../common';
6+
import * as utxolib from '@bitgo/utxo-lib';
67
import { IBaseCoin } from '../baseCoin';
78
import { BitGoBase } from '../bitgoBase';
89
import {
@@ -183,9 +184,9 @@ export class PendingApproval implements IPendingApproval {
183184
const recipients = this.info()?.transactionRequest?.buildParams?.recipients || [];
184185
const type = this.info()?.transactionRequest?.buildParams?.type;
185186

186-
// We only want to not recreate transactions with no recipients if it is an UTXO coin.
187-
// There is no easy way to do this in sdk-core, but `network` is only set on UTXO coins.
188-
if ('network' in this.baseCoin && recipients.length === 0 && type !== 'consolidate') {
187+
// We only want to not recreate transactions with no recipients if it is a UTXO coin.
188+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
189+
if (utxolib.isValidNetwork((this.baseCoin as any).network) && recipients.length === 0 && type !== 'consolidate') {
189190
canRecreateTransaction = false;
190191
}
191192

0 commit comments

Comments
 (0)