From 5f014ec715bd5266ff0f47d2f16261d61045ced7 Mon Sep 17 00:00:00 2001 From: Paul Puey Date: Mon, 15 Jul 2024 12:23:55 -0700 Subject: [PATCH 1/3] Add more currency code mappings --- src/util.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/util.ts b/src/util.ts index b0bbbcd..d84e29f 100644 --- a/src/util.ts +++ b/src/util.ts @@ -8,14 +8,21 @@ const CURRENCY_CONVERSION = { AWCBEP20: 'AWC', AWCBSC: 'AWC', DAIMATIC: 'DAI', + ETHARB: 'ETH', ETHOP: 'ETH', + ETHBASE: 'ETH', + GALAERC20: 'GALA', WBTCMATIC: 'WBTC', USDCERC20: 'USDC', USDT20: 'USDT', USDTERC20: 'USDT', USDTPOLYGON: 'USDT', + USDCARB: 'USDC', USDCPOLYGON: 'USDC', USDCTRC20: 'USDC', + USDDTRC20: 'USDD', + USDTARB: 'USDT', + USDTSOL: 'USDT', USDTTRC20: 'USDT', ZADDR: 'ZEC', BCHABC: 'BCH', From 4be79b7d5aaa644d34e919b965b9e3487544be45 Mon Sep 17 00:00:00 2001 From: Paul Puey Date: Sat, 27 Jul 2024 23:42:49 -0500 Subject: [PATCH 2/3] Fix Changenow --- src/partners/changenow.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/partners/changenow.ts b/src/partners/changenow.ts index a07195d..7c999ad 100644 --- a/src/partners/changenow.ts +++ b/src/partners/changenow.ts @@ -97,6 +97,9 @@ export const queryChangeNow = async ( const result = await response.json() const txs = asChangeNowResult(result).exchanges + if (txs.length === 0) { + break + } for (const rawTx of txs) { let tx: ChangeNowTx try { @@ -130,11 +133,8 @@ export const queryChangeNow = async ( latestIsoDate = ssTx.isoDate } } - datelog(`ChangeNow latestIsoDate ${latestIsoDate}`) - offset += LIMIT - if (txs.length < LIMIT) { - break - } + datelog(`ChangeNow offset ${offset} latestIsoDate ${latestIsoDate}`) + offset += txs.length retry = 0 } catch (e) { datelog(e) From 016b2daffc05ebe3b532a0b77dd94d83ec64d4ce Mon Sep 17 00:00:00 2001 From: Paul Puey Date: Tue, 8 Oct 2024 12:47:50 -0700 Subject: [PATCH 3/3] Fix paybis timeout Only roll back 7 days. 30 days takes longer than 30m to query which times out the plugin --- src/partners/paybis.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/partners/paybis.ts b/src/partners/paybis.ts index 0b55082..7e921b5 100644 --- a/src/partners/paybis.ts +++ b/src/partners/paybis.ts @@ -130,7 +130,7 @@ const QUERY_LIMIT_TXS = 50 * How far to rollback from the last successful query * date when starting a new query */ -const QUERY_LOOKBACK = 1000 * 60 * 60 * 24 * 30 // 30 days +const QUERY_LOOKBACK = 1000 * 60 * 60 * 24 * 7 // 30 days /** Time period to query per loop */ const QUERY_TIME_BLOCK_MS = QUERY_LOOKBACK