From 668a3c1f2ab6ad68950c4878507e73238d74e609 Mon Sep 17 00:00:00 2001 From: Carlos Rosado Date: Tue, 12 Nov 2024 08:55:20 -0600 Subject: [PATCH 1/2] fix: Validation that the correct message is displayed if the address has already been used from another IP --- package-lock.json | 2 +- src/utils/validations.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 890d71b..8a0b985 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,6 @@ "@rsksmart/rns": "^1.0.0", "axios": "^1.7.7", "cron": "^3.1.7", - "date-fns": "^4.1.0", "date-fns-tz": "^3.2.0", "ethereumjs-tx": "1.3.6", "next": "14.2.15", @@ -8830,6 +8829,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz", "integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==", + "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/kossnocorp" diff --git a/src/utils/validations.ts b/src/utils/validations.ts index 48f2d19..b6bf35b 100644 --- a/src/utils/validations.ts +++ b/src/utils/validations.ts @@ -34,7 +34,7 @@ export const alreadyDispensed = (address: string, ip:string, faucetHistory: Fauc } const usedAddress = faucetHistory.hasOwnProperty(address) - if (currentUser?.ip && isFilterByIP) return 'IP already used today, try again tomorrow.' + if (currentUser?.ip === ip && isFilterByIP) return 'IP already used today, try again tomorrow.' if (usedAddress) return 'Address already used today, try again tomorrow.' faucetHistory[address] = { address, From 073e3864f15cbd54452a95d42067a4ad39b107c2 Mon Sep 17 00:00:00 2001 From: Carlos Rosado Date: Tue, 12 Nov 2024 09:35:10 -0600 Subject: [PATCH 2/2] fix: npm i -f --- package-lock.json | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 99af25e..de70ad8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8519,24 +8519,6 @@ "integrity": "sha512-qTcEYLen3r7ojZNgVUaRggOI+KM7jrKxXeSHhogh/TWxYMeONEMqY+hmkobiYQozsGIyg9OYVzO4ZIfoB4I0pQ==", "optional": true }, - "node_modules/date-fns": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz", - "integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==", - "peer": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/kossnocorp" - } - }, - "node_modules/date-fns-tz": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/date-fns-tz/-/date-fns-tz-3.2.0.tgz", - "integrity": "sha512-sg8HqoTEulcbbbVXeg84u5UnlsQa8GS5QXMqjjYIhS4abEVVKIUwe0/l/UhrZdKaL/W5eWZNlbTeEIiOXTcsBQ==", - "peerDependencies": { - "date-fns": "^3.0.0 || ^4.0.0" - } - }, "node_modules/debounce-fn": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/debounce-fn/-/debounce-fn-4.0.0.tgz",