From 702ac13da53345d1ef2da96e801da9bcc27deab4 Mon Sep 17 00:00:00 2001 From: Pavel Rahman <51755949+pajgo@users.noreply.github.com> Date: Fri, 21 Jun 2024 17:53:38 +0600 Subject: [PATCH] fix: custom hooks tokenid detect (#328) --- src/custom/cappasity-process-post-nft.js | 2 +- src/custom/cappasity-update-pre.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/custom/cappasity-process-post-nft.js b/src/custom/cappasity-process-post-nft.js index a779414a..1ed23611 100644 --- a/src/custom/cappasity-process-post-nft.js +++ b/src/custom/cappasity-process-post-nft.js @@ -5,7 +5,7 @@ const config = { }, }; -const isDigitOnly = /[0-9]*/; +const isDigitOnly = /^[0-9]*$/; const UINT_MIN_LENGTH = 21; async function notifyService(fileData) { diff --git a/src/custom/cappasity-update-pre.js b/src/custom/cappasity-update-pre.js index 1597210d..9a75f8dc 100644 --- a/src/custom/cappasity-update-pre.js +++ b/src/custom/cappasity-update-pre.js @@ -1,6 +1,6 @@ const hasAccess = require('../utils/has-access'); -const isDigitOnly = /[0-9]*/; +const isDigitOnly = /^[0-9]*$/; const UINT_MIN_LENGTH = 21; module.exports = async function extractMetadata(username, data) {