diff --git a/.gitignore b/.gitignore index 37b1dad0b..2f1803b01 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ node_modules # local env files .env.local .env.*.local +public/k_* # Log files npm-debug.log* diff --git a/src/config/config.local.ts b/src/config/config.local.ts index 15f959a59..48d29ae30 100644 --- a/src/config/config.local.ts +++ b/src/config/config.local.ts @@ -14,8 +14,8 @@ export default { usdc: { enabled: true, networkId: 80001, - rpcEndpoint: 'https://matic-mumbai.chainstacklabs.com', - rpcMaxBlockRange: 10_000, + rpcEndpoint: 'wss://polygon-mumbai.g.alchemy.com/v2/#ALCHEMY_API_KEY#', + rpcMaxBlockRange: 1_296_000, // 30 days - Range not limited, only limited by number of logs returned // eslint-disable-next-line max-len // rpcEndpoint: 'wss://shy-sparkling-wind.matic-testnet.discover.quiknode.pro/4461ca78cea96dd6a168a58d8fc30a021cabf01d/', usdcContract: '0x0FA8781a83E46826621b3BC094Ea2A0212e71B23', diff --git a/src/config/config.testnet.ts b/src/config/config.testnet.ts index 7c1588d77..7fff6735a 100644 --- a/src/config/config.testnet.ts +++ b/src/config/config.testnet.ts @@ -14,8 +14,8 @@ export default { usdc: { enabled: true, networkId: 80001, - rpcEndpoint: 'https://matic-mumbai.chainstacklabs.com', - rpcMaxBlockRange: 10_000, + rpcEndpoint: 'wss://polygon-mumbai.g.alchemy.com/v2/#ALCHEMY_API_KEY#', + rpcMaxBlockRange: 1_296_000, // 30 days - Range not limited, only limited by number of logs returned usdcContract: '0x0FA8781a83E46826621b3BC094Ea2A0212e71B23', transferContract: '0x2805f3187dcDfa424EFA8c55Db6012Cf08Fa6eEc', // v3 htlcContract: '0x2EB7cd7791b947A25d629219ead941fCd8f364BF', // v3 diff --git a/src/i18n/en.po b/src/i18n/en.po index 87419ce26..4a774cb56 100644 --- a/src/i18n/en.po +++ b/src/i18n/en.po @@ -851,7 +851,7 @@ msgstr "" #: src/components/modals/BtcSendModal.vue:441 #: src/components/modals/SendModal.vue:600 -#: src/components/modals/UsdcSendModal.vue:560 +#: src/components/modals/UsdcSendModal.vue:561 msgid "Edit transaction" msgstr "" @@ -950,7 +950,7 @@ msgstr "" msgid "Failed" msgstr "" -#: src/components/modals/UsdcSendModal.vue:658 +#: src/components/modals/UsdcSendModal.vue:659 #: src/components/swap/SwapModal.vue:936 msgid "Failed to fetch USDC fees. Retrying... (Error: {message})" msgstr "" @@ -1739,7 +1739,7 @@ msgstr "" #: src/components/modals/BtcSendModal.vue:440 #: src/components/modals/SendModal.vue:599 -#: src/components/modals/UsdcSendModal.vue:559 +#: src/components/modals/UsdcSendModal.vue:560 msgid "Retry" msgstr "" @@ -1876,7 +1876,7 @@ msgstr "" #: src/components/modals/BtcSendModal.vue:437 #: src/components/modals/SendModal.vue:596 -#: src/components/modals/UsdcSendModal.vue:556 +#: src/components/modals/UsdcSendModal.vue:557 msgid "Sending Transaction" msgstr "" @@ -1902,11 +1902,11 @@ msgstr "" msgid "Sent {nim} NIM to {name}" msgstr "" -#: src/components/modals/UsdcSendModal.vue:595 +#: src/components/modals/UsdcSendModal.vue:596 msgid "Sent {usdc} USDC" msgstr "" -#: src/components/modals/UsdcSendModal.vue:591 +#: src/components/modals/UsdcSendModal.vue:592 msgid "Sent {usdc} USDC to {name}" msgstr "" @@ -2011,7 +2011,7 @@ msgstr "" #: src/components/modals/BtcSendModal.vue:509 #: src/components/modals/SendModal.vue:647 -#: src/components/modals/UsdcSendModal.vue:607 +#: src/components/modals/UsdcSendModal.vue:608 msgid "Something went wrong" msgstr "" diff --git a/src/lib/KeyReplacer.ts b/src/lib/KeyReplacer.ts index 5a321c949..0010b541d 100644 --- a/src/lib/KeyReplacer.ts +++ b/src/lib/KeyReplacer.ts @@ -8,10 +8,12 @@ export async function replaceKey(input: string): Promise { const keyName = sections[1]; const fileName = `k_${btoa(keyName)}`; - const encodedKey = await fetch(`/${fileName}`).then((res) => res.text()); + const encodedKey = await fetch(`/${fileName}`) + .then((res) => res.text()) + .then((text) => text.replace(/\s/g, '')); // Remove any whitespace & newlines // Replace the key name with the key itself - sections[1] = atob(encodedKey.replace(/\s/g, '')); + sections[1] = atob(encodedKey); // Create the resulting string without the delimiters return sections.join('');