Skip to content

Commit c488f0e

Browse files
authored
fix(wrw): fix uploading unsigned sweep tx for sol, dot and ada
2 parents 6fe6055 + ea85586 commit c488f0e

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

modules/sdk-coin-ada/src/ada.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ interface RecoveryOptions {
5555
interface AdaTx {
5656
serializedTx: string;
5757
scanIndex: number;
58+
coin?: string;
5859
}
5960

6061
export type AdaTransactionExplanation = TransactionExplanation;
@@ -381,6 +382,8 @@ export class Ada extends BaseCoin {
381382
txBuilder.addSignature({ pub: adaKeyPair.getKeys().pub }, signatureHex);
382383
const signedTransaction = await txBuilder.build();
383384
serializedTx = signedTransaction.toBroadcastFormat();
385+
} else {
386+
return { serializedTx: serializedTx, scanIndex: i, coin: this.getChain() };
384387
}
385388
return { serializedTx: serializedTx, scanIndex: i };
386389
}

modules/sdk-coin-dot/src/dot.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ interface RecoveryOptions {
6262
interface DotTx {
6363
serializedTx: string;
6464
scanIndex: number;
65+
coin?: string;
6566
}
6667

6768
const dotUtils = Utils.default;
@@ -441,6 +442,8 @@ export class Dot extends BaseCoin {
441442
txnBuilder.addSignature({ pub: dotKeyPair.getKeys().pub }, signatureHex);
442443
const signedTransaction = await txnBuilder.build();
443444
serializedTx = signedTransaction.toBroadcastFormat();
445+
} else {
446+
return { serializedTx: serializedTx, scanIndex: i, coin: this.getChain() };
444447
}
445448
return { serializedTx: serializedTx, scanIndex: i };
446449
}

modules/sdk-coin-sol/src/sol.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export interface SolParseTransactionOptions extends BaseParseTransactionOptions
104104
interface SolTx {
105105
serializedTx: string;
106106
scanIndex: number;
107+
coin?: string;
107108
}
108109

109110
interface SolDurableNonceFromNode {
@@ -709,6 +710,13 @@ export class Sol extends BaseCoin {
709710

710711
const completedTransaction = await txBuilder.build();
711712
const serializedTx = completedTransaction.toBroadcastFormat();
713+
if (isUnsignedSweep) {
714+
return {
715+
serializedTx: serializedTx,
716+
scanIndex: scanIndex,
717+
coin: this.getChain(),
718+
};
719+
}
712720
return {
713721
serializedTx: serializedTx,
714722
scanIndex: scanIndex,

0 commit comments

Comments
 (0)