@pushchain/ui-kit
Version:
Push Chain is a true universal L1 that is 100% EVM compatible. It allows developers to deploy once and make their apps instantly compatible with users from all other L1s (Ethereum, Solana, etc) with zero on-chain code change.
15 lines • 631 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.usePushWalletContext = void 0;
const react_1 = require("react");
const WalletContextMap_1 = require("../context/WalletContextMap");
// Custom hook to use WalletContext
const usePushWalletContext = (uid) => {
const context = (0, react_1.useContext)((0, WalletContextMap_1.getWalletContext)(uid || 'default'));
if (!context) {
throw new Error('usePushWalletContext must be used within a PushWalletProvider');
}
return context;
};
exports.usePushWalletContext = usePushWalletContext;
//# sourceMappingURL=usePushWallet.js.map