@biconomy/abstractjs
Version:
SDK for Biconomy integration with support for account abstraction, smart accounts, ERC-4337.
19 lines • 839 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPaymentToken = void 0;
const Utils_1 = require("../../../account/utils/Utils.js");
const getGasToken_1 = require("./getGasToken.js");
const getPaymentToken = async (client, parameters) => {
const gasToken = await (0, getGasToken_1.getGasToken)(client, {
chainId: parameters.chainId,
address: parameters.tokenAddress
});
const paymentToken = gasToken.paymentTokens.find((paymentToken) => (0, Utils_1.addressEquals)(paymentToken.address, parameters.tokenAddress));
return {
isArbitraryPaymentTokensSupported: gasToken.isArbitraryPaymentTokensSupported,
paymentToken
};
};
exports.getPaymentToken = getPaymentToken;
exports.default = exports.getPaymentToken;
//# sourceMappingURL=getPaymentToken.js.map