@dynamic-labs/sdk-react-core
Version:
A React SDK for implementing wallet web3 authentication and authorization to your website.
20 lines (16 loc) • 507 B
JavaScript
'use client'
;
Object.defineProperty(exports, '__esModule', { value: true });
// Derive step state from remaining wallets
const getChainStepState = (chain, chainsLeftToConnect) => {
const isCurrentStep = chain === chainsLeftToConnect[0];
const isStepComplete = !chainsLeftToConnect.includes(chain);
if (isCurrentStep) {
return 'current';
}
if (isStepComplete) {
return 'done';
}
return 'upcoming';
};
exports.getChainStepState = getChainStepState;