@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
60 lines • 2.62 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.mockCurrencyIds = exports.mockCurrenciesByProvider = exports.getTokenOrCryptoCurrencyById = exports.findCryptoCurrencyById = exports.usdcToken = exports.arbitrumToken = exports.mockInjectiveCryptoCurrency = exports.mockScrollCryptoCurrency = exports.mockBaseCryptoCurrency = exports.mockArbitrumCryptoCurrency = exports.mockEthCryptoCurrency = exports.mockBtcCryptoCurrency = void 0;
const currencies_1 = require("../../currencies");
exports.mockBtcCryptoCurrency = (0, currencies_1.getCryptoCurrencyById)("bitcoin");
exports.mockEthCryptoCurrency = (0, currencies_1.getCryptoCurrencyById)("ethereum");
exports.mockArbitrumCryptoCurrency = (0, currencies_1.getCryptoCurrencyById)("arbitrum");
exports.mockBaseCryptoCurrency = (0, currencies_1.getCryptoCurrencyById)("base");
exports.mockScrollCryptoCurrency = (0, currencies_1.getCryptoCurrencyById)("scroll");
exports.mockInjectiveCryptoCurrency = (0, currencies_1.getCryptoCurrencyById)("injective");
exports.arbitrumToken = {
type: "TokenCurrency",
id: "arbitrum/erc20/arbitrum",
contractAddress: "0x912CE59144191C1204E64559FE8253a0e49E6548",
parentCurrency: exports.mockArbitrumCryptoCurrency,
tokenType: "erc20",
name: "Arbitrum",
ticker: "ARB",
units: [
{
name: "Arbitrum",
code: "ARB",
magnitude: 18,
},
],
};
exports.usdcToken = {
type: "TokenCurrency",
id: "ethereum/erc20/usd__coin",
contractAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
parentCurrency: exports.mockEthCryptoCurrency,
tokenType: "erc20",
name: "USD Coin",
ticker: "USDC",
units: [
{
name: "USD Coin",
code: "USDC",
magnitude: 6,
},
],
};
const findCryptoCurrencyById = (id) => [exports.mockBtcCryptoCurrency, exports.mockEthCryptoCurrency, exports.mockArbitrumCryptoCurrency].find(a => a.id === id);
exports.findCryptoCurrencyById = findCryptoCurrencyById;
const getTokenOrCryptoCurrencyById = (id) => [
exports.mockBtcCryptoCurrency,
exports.mockEthCryptoCurrency,
exports.mockArbitrumCryptoCurrency,
exports.arbitrumToken,
exports.usdcToken,
].find(a => a.id === id);
exports.getTokenOrCryptoCurrencyById = getTokenOrCryptoCurrencyById;
exports.mockCurrenciesByProvider = [
{
providerId: "ethereum",
currenciesByNetwork: [exports.mockEthCryptoCurrency],
},
];
exports.mockCurrencyIds = ["bitcoin", "ethereum", "arbitrum", "base"];
//# sourceMappingURL=currencies.mock.js.map