From e14d1e004556919ddd1ca87021708b660f1ebce9 Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Fri, 19 Jan 2024 01:28:12 +0530 Subject: [PATCH] bug fix --- index.html | 16 ++++++++++++++-- index.min.html | 2 +- scripts/floBlockchainAPI.js | 23 +++++++++++++++++++++-- scripts/floBlockchainAPI.min.js | 1 + 4 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 scripts/floBlockchainAPI.min.js diff --git a/index.html b/index.html index 423f2bc..1d0916c 100644 --- a/index.html +++ b/index.html @@ -921,8 +921,20 @@ window.addEventListener('hashchange', e => showPage(window.location.hash)) window.addEventListener("load", () => { document.body.classList.remove('hide') - document.querySelectorAll('sm-input[data-flo-id]').forEach(input => input.customValidation = floCrypto.validateAddr) - document.querySelectorAll('sm-input[data-private-key]').forEach(input => input.customValidation = floCrypto.getPubKeyHex) + document.querySelectorAll('sm-input[data-flo-id]').forEach(input => input.customValidation = (value) => { + if (!value) return { isValid: false, errorText: 'Please enter a FLO address' } + return { + isValid: floCrypto.validateFloID(value), + errorText: `Invalid FLO address.
It usually starts with "F"` + } + }) + document.querySelectorAll('sm-input[data-private-key]').forEach(input => input.customValidation = (value) => { + if (!value) return { isValid: false, errorText: 'Please enter a private key' } + return { + isValid: floCrypto.getPubKeyHex(value), + errorText: `Invalid private key.
It's a long string of random characters usually starting with 'R'.` + } + }) document.addEventListener('keyup', (e) => { if (e.key === 'Escape') { closePopup() diff --git a/index.min.html b/index.min.html index 126a09d..fd52b64 100644 --- a/index.min.html +++ b/index.min.html @@ -1,4 +1,4 @@ - RanchiMall Times
Cancel OK

Loading RanchiMall Times

Explore

No related articles

FLO address

Articles contributed

No articles written

Article by

In this article

Pick something to read
Analytics Requests Writers CC

No articles

No requests

No writers

Approve FLO IDs

Add FLO IDs that are allowed to submit article publishing requests from CC.

Add

No approved FLO IDs

Sign in

Liking an article supports and encourages the creators.

Sign In

New here? Generate your FLO credentials below to continue

FLO credentials

You can use FLO credentials with RanchiMall Times and all RanchiMall FLO apps.

FLO address
Private key
Sign in with these credentials Keep your private key secure and don't share with anyone. Once lost there is no way to recover private key.
Copy link
Title
Select category
Hero image
Summary
Add tags
contributors
FLO address
Name
Bio
Add writer

Settings

BTC integrated with FLO

You can use your FLO private key to perform transactions on the BTC network within our app ecosystem. The private key is the same for both.

My FLO address
My Bitcoin address
Sign out
Admin dashboard
Cancel OK

Loading RanchiMall Times

Explore

No related articles

FLO address

Articles contributed

No articles written

Article by

In this article

Pick something to read
Analytics Requests Writers CC

No articles

No requests

No writers

Approve FLO IDs

Add FLO IDs that are allowed to submit article publishing requests from CC.

Add

No approved FLO IDs

Sign in

Liking an article supports and encourages the creators.

Sign In

New here? Generate your FLO credentials below to continue

FLO credentials

You can use FLO credentials with RanchiMall Times and all RanchiMall FLO apps.

FLO address
Private key
Sign in with these credentials Keep your private key secure and don't share with anyone. Once lost there is no way to recover private key.
Copy link
Title
Select category
Hero image
Summary
Add tags
contributors
FLO address
Name
Bio
Add writer

Settings

BTC integrated with FLO

You can use your FLO private key to perform transactions on the BTC network within our app ecosystem. The private key is the same for both.

My FLO address
My Bitcoin address
Sign out
Admin dashboard