Skip to content

Commit bdf571e

Browse files
committed
fix(wallet): refine dRep ID retrieval logic
- Updated the dRepIds function to prioritize multisig wallet DRep ID retrieval using role-based key access, enhancing the fallback mechanism to appWallet DRep ID. This change improves the reliability of DRep ID fetching in the wallet data loader.
1 parent 537ac69 commit bdf571e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/components/common/overall-layout/mobile-wrappers/wallet-data-loader-wrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export default function WalletDataLoaderWrapper({
152152

153153
function dRepIds() {
154154
// Use multisig wallet DRep ID if available, otherwise fallback to appWallet
155-
const dRepId = multisigWallet?.getDRepId() || appWallet?.dRepId;
155+
const dRepId = multisigWallet?.getKeysByRole(3) ? multisigWallet?.getDRepId() : appWallet?.dRepId;
156156
if (!dRepId) return null;
157157
return getDRepIds(dRepId);
158158
}

src/hooks/common.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export function buildWallet(
9090
}
9191

9292
//depricated -> only payment-script left in for compatibility
93+
//uses unordered keys for payment script
9394
//Remove later when refactoring
9495
const nativeScript = {
9596
type: wallet.type ? wallet.type : "atLeast",

0 commit comments

Comments
 (0)