@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.
19 lines • 892 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.signAuthorizationForWalletConnection = void 0;
const signAuthorization_1 = require("../providers/walletProviders/ethereum/signAuthorization");
const signAuthorizationForWalletConnection = async (externalWallet, params, registry, socialSignAuthorization) => {
if (!externalWallet) {
return socialSignAuthorization(params);
}
const provider = registry.getProvider(externalWallet.providerName);
if (!provider) {
throw new Error('Provider not found');
}
if (typeof provider.signAuthorization !== 'function') {
throw new Error(signAuthorization_1.EIP_7702_UNSUPPORTED_ERROR);
}
return provider.signAuthorization(params);
};
exports.signAuthorizationForWalletConnection = signAuthorizationForWalletConnection;
//# sourceMappingURL=walletAuthorization.js.map