File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
modules/sdk-core/src/bitgo Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -277,8 +277,14 @@ export interface ParseTransactionOptions {
277277 [ index : string ] : unknown ;
278278}
279279
280- // TODO (SDKT-9): reverse engineer and add options
280+ /**
281+ * This is only used for determining the PayGo fee of a transaction which is only relevant for UTXO coins.
282+ * Some coins return various other fields here, but they are only used internally by the respective coins.
283+ */
281284export interface ParsedTransaction {
285+ // the callsite assumes that this is the PayGo amount
286+ implicitExternalSpendAmount ?: number | bigint ;
287+ // coins may add internal fields
282288 [ index : string ] : unknown ;
283289}
284290
Original file line number Diff line number Diff line change @@ -304,16 +304,16 @@ export class PendingApproval implements IPendingApproval {
304304 prebuildParams = _ . extend ( { } , prebuildParams , { reqId : reqId } ) ;
305305 const signedTransaction = await this . wallet . prebuildAndSignTransaction ( prebuildParams ) ;
306306 // compare PAYGo fees
307- const originalParsedTransaction = ( await this . baseCoin . parseTransaction ( {
307+ const originalParsedTransaction = await this . baseCoin . parseTransaction ( {
308308 txParams : prebuildParams ,
309309 wallet : this . wallet ,
310310 txPrebuild : originalPrebuild ,
311- } ) ) as any ;
312- const recreatedParsedTransaction = ( await this . baseCoin . parseTransaction ( {
311+ } ) ;
312+ const recreatedParsedTransaction = await this . baseCoin . parseTransaction ( {
313313 txParams : prebuildParams ,
314314 wallet : this . wallet ,
315315 txPrebuild : signedTransaction ,
316- } ) ) as any ;
316+ } ) ;
317317
318318 if ( _ . isUndefined ( recreatedParsedTransaction . implicitExternalSpendAmount ) ) {
319319 return signedTransaction ;
You can’t perform that action at this time.
0 commit comments