aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/utils.js')
-rw-r--r--src/lib/utils.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js
index 279dcb98..c1ec5e5b 100644
--- a/src/lib/utils.js
+++ b/src/lib/utils.js
@@ -10,10 +10,8 @@ export function scroll(section) {
}
const base = browser ? '' : PUBLIC_COINOS_URL;
-export const punk = (k) => {
- let n = k ? parseInt(k.slice(-2), 16) : parseInt(Math.random() * 255);
- return Math.floor((n / 256) * 64) + 1 + '.webp';
-};
+
+export const punk = (k) => Math.floor((parseInt(k.slice(-2), 16) / 256) * 64) + 1 + '.webp';
export const g = (url, fetch, headers) =>
fetch(base + url, { headers })