Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/sdk-coin-sol/src/sol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ export class Sol extends BaseCoin {
}

const bitgoKey = params.bitgoKey.replace(/\s/g, '');
const isUnsignedSweep = !params.userKey && !params.backupKey && !params.walletPassphrase;
const isUnsignedSweep = !params.walletPassphrase;

// Build the transaction
const MPC = await EDDSAMethods.getInitializedMpcInstance();
Expand Down Expand Up @@ -1575,7 +1575,7 @@ export class Sol extends BaseCoin {
* @param {string} [params.endingScanIndex] - receive address index to end scanning at. default to startingScanIndex + 20 (exclusive).
*/
async recoverConsolidations(params: SolConsolidationRecoveryOptions): Promise<MPCTxs | MPCSweepTxs> {
const isUnsignedSweep = !params.userKey && !params.backupKey && !params.walletPassphrase;
const isUnsignedSweep = !params.walletPassphrase;
const startIdx = params.startingScanIndex || 1;
const endIdx = params.endingScanIndex || startIdx + DEFAULT_SCAN_FACTOR;

Expand Down
10 changes: 0 additions & 10 deletions modules/sdk-coin-sol/test/unit/sol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2111,16 +2111,6 @@ describe('SOL:', function () {
})
.should.rejectedWith('missing backupKey');

// missing wallet passphrase
await basecoin
.recover({
userKey: testData.keys.userKey,
backupKey: testData.keys.backupKey,
bitgoKey: testData.keys.bitgoKey,
recoveryDestination: testData.keys.destinationPubKey,
})
.should.rejectedWith('missing wallet passphrase');

// incorrect wallet passphrase, user key, backup key combination
await basecoin
.recover({
Expand Down
6 changes: 3 additions & 3 deletions modules/sdk-coin-sui/src/sui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ export class Sui extends BaseCoin {
payment: inputCoins,
});

const isUnsignedSweep = !params.userKey && !params.backupKey && !params.walletPassphrase;
const isUnsignedSweep = !params.walletPassphrase;
if (isUnsignedSweep) {
return this.buildUnsignedSweepTransaction(txBuilder, senderAddress, bitgoKey, idx, derivationPath);
}
Expand Down Expand Up @@ -509,7 +509,7 @@ export class Sui extends BaseCoin {
payment: gasObjects,
});

const isUnsignedSweep = !params.userKey && !params.backupKey && !params.walletPassphrase;
const isUnsignedSweep = !params.walletPassphrase;
if (isUnsignedSweep) {
return this.buildUnsignedSweepTransaction(txBuilder, senderAddress, bitgoKey, idx, derivationPath, token);
}
Expand Down Expand Up @@ -733,7 +733,7 @@ export class Sui extends BaseCoin {
* @param {string} [params.endingScanIndex] - receive address index to end scanning at. default to startingScanIndex + 20 (exclusive).
*/
async recoverConsolidations(params: MPCConsolidationRecoveryOptions): Promise<MPCTxs | MPCSweepTxs> {
const isUnsignedSweep = !params.userKey && !params.backupKey && !params.walletPassphrase;
const isUnsignedSweep = !params.walletPassphrase;
const startIdx = utils.validateNonNegativeNumber(
1,
'Invalid starting index to scan for addresses',
Expand Down