From c0922738080e218740cb8783601804c0ac7a7a05 Mon Sep 17 00:00:00 2001 From: sairajzero Date: Thu, 6 Jul 2023 17:51:50 +0530 Subject: [PATCH] update and relocate script files --- old_index.html | 14749 ---------------- btcOperator.js => scripts/btcOperator.js | 0 compactIDB.js => scripts/compactIDB.js | 0 .../floBlockchainAPI.js | 0 floCloudAPI.js => scripts/floCloudAPI.js | 0 floCrypto.js => scripts/floCrypto.js | 0 floDapps.js => scripts/floDapps.js | 0 scripts/floExchangeAPI.js | 21 +- floTokenAPI.js => scripts/floTokenAPI.js | 0 lib.js => scripts/lib.js | 0 10 files changed, 11 insertions(+), 14759 deletions(-) delete mode 100644 old_index.html rename btcOperator.js => scripts/btcOperator.js (100%) rename compactIDB.js => scripts/compactIDB.js (100%) rename floBlockchainAPI.js => scripts/floBlockchainAPI.js (100%) rename floCloudAPI.js => scripts/floCloudAPI.js (100%) rename floCrypto.js => scripts/floCrypto.js (100%) rename floDapps.js => scripts/floDapps.js (100%) rename floTokenAPI.js => scripts/floTokenAPI.js (100%) rename lib.js => scripts/lib.js (100%) diff --git a/old_index.html b/old_index.html deleted file mode 100644 index 84cbc1b..0000000 --- a/old_index.html +++ /dev/null @@ -1,14749 +0,0 @@ - - - - - - - RanchiMall Pay - - - - - - - - -

-
- Cancel - OK -
-
- -

Some input required

- -
- Cancel - OK -
-
- -
- - close - - - -

-

-
- Back -
- Next -
-
- -
- - Loader - - -

Loading RanchiMall Pay

- Sign Out -
- -
-
-

RanchiMall Pay

-

Send & request money
using
UPI on Blockchain

-
- -
- - - - -
-

Point your camera towards QR Code.
- *Only works with RanchiMall Pay. -

-
- -
-

Show this QR Code to receive money using RanchiMall Pay

- - Download my QR code - -
-
-
- - -

- Send wallet money to any FLO address. -

-
- - How to send rupee? - -
Step 1
-

Enter receiver's FLO address.

-
Step 2
-

Enter the amount you want to send.

-
Step 3
-

Press Send button.

-
- - - rupee-symbol - - - - -
- - -

- Add balance to your RanchiMall pay wallet. -

-
- - How to deposit money? - -
Step 1
-

Copy UPI address shown below.

-
Step 2
-

Open any UPI app of your preference and send money to copied UPI address. (Do not close this - browser)

-
Step 3
-

Copy the UPI transaction ID shown after transaction was successful.

-
Step 4
-

Enter the amount you sent to copied address

-
Step 5
-

Then enter the UPI transaction ID you copied when was transaction completed.

-
Step 6
-

Press Deposit button

-
-

Send money to UPI ID below.

-
-

Loading cashier UPI...

- - Copy - - - -
- - - rupee-symbol - - - - -
- - -

- Transfer wallet balance to your bank account using specified UPI address. -

-
- - How to withdraw rupee? - -
Step 1
-

Enter amount you want to withdraw

-
Step 2
-

Select UPI address you want to withdraw rupee to. If you haven't added UPI address, add one using - 'Add UPI address' button.

-
Step 3
-

Press Withdraw button

-
- - - rupee-symbol - - - - -
Withdraw To
-
- + Add UPI - address -
- - -

- Request money from others using their FLO address. -

-
- - How to request rupee? - -
Step 1
-

Enter amount you want to request

-
Step 2
-

Enter the FLO address of person you want to request rupee from.

-
Step 3
-

Press Request button

-
- - - rupee-symbol - - - - -
- - -
- - What is this? - -

- Don't have enough wallet balance? Pay to our cashier through UPI and our cashier will complete that - transaction on your behalf. -

-
-
- - How to pay through cashier? - -
Step 1
-

Copy UPI address shown below.

-
Step 2
-

Open any UPI app of your preference and send money to copied UPI address. (Do not close this - browser)

-
Step 3
-

Enter the amount you sent to copied address

-
Step 4
-

Then enter the FLO address of person you want send rupee to.

-
Step 5
-

Select UPI address that you used when sending money copied UPI address. If you haven't added UPI - address, add one using 'Add UPI address' button.

-
Step 6
-

Press Pay button

-
-

Send money to UPI ID below.

-
-

Loading cashier UPI...

- - Copy - - - -
- - - rupee-symbol - - - - - -
- - - -
- - - - - success-art - - - - - - - - - - - - - - - - - - - - - -
-
- - failure - - - - -
-

-

-
-
Transaction ID
-

- - Copy - - - -
- Done -
- - - - - - - - - - - - - - - - - -
-

-

-
- - - - - remove - - - - -
-
-
FLO ID
-
-

- - Copy - - - -
-
-
- - - -

Send rupee

-
-
- - request - - - - -

Request rupee

-
-
-
- - - - - - - -
- -
- - qr scanner - - - - - - -
-
- -
-
-
-

Rupee actions

-
-
- - - -

Send

-
-
- - deposit - - - - - - -

deposit

-
-
- - withdraw - - - - - - - -

Withdraw

-
-
- - request - - - - -

Request

-
-
- - - - -

pay through cashier

- -
-
-
-

Contacts

-
-
-
-

S

-

Sairaj Mote

-
-
-
-
-
-

My Balances

- -
-
-
-
-
?
-

Your wallet balance

-
-
Wallet
-

0

-
-
-
-
?
-

Money that is in-process after deposit.

-
-
In-process
-

0

-
-
-
-
?
-

Your FLO balance. This is required for every transaction.

-
-
FLO
-

0

-
-
-
-
-
-
-

Requests

- - Deposits - Withdrawals - Pay Through Cashier - Unconfirmed - - - -
- Load pending -
-
-
- - - - - Empty icon - - - - - - - - - -

No deposit requests.

-
-
- -
- Load pending -
-
-
- - - - - Empty icon - - - - - - - - - -

No withdraw requests.

-
-
- -
- Load pending - -
-
-
- - - - - Empty icon - - - - - - - - - -

No pay requests.

-
-
- -
- Load pending - -
-
-
- - - - - Empty icon - - - - - - - - - -

No unconfirmed requests.

-
-
-
-
-
-
-

My Balances

- -
-
-
-
-
?
-

Your wallet balance

-
-
Wallet
-

0

-
-
-
-
?
-

Your FLO balance. This is required for every transaction.

-
-
FLO
-

0

-
-
-
-
-
-

Requests

- - Pending - Paid - Declined - - - -
-

You don't have any pending requests.

-
- - -

No paid requests.

-
- -
-

No declined requests.

-
-
-
-
-
-

Activity

- Refresh -
- - Sent - Received - Deposits - Withdrawals - Paid through cashier - System Notifications - - - -
-

You haven't sent any rupee yet.

-
- -
-

You haven't sent any rupee yet.

-
- -
-

You haven't deposited rupee yet.

-
- -
-

You haven't withdrawn rupee yet.

-
- -
-

You haven't paid through cashier yet.

-
- -
-

No messages from cashier.

-
-
-
-
-
-

Complaints

-

-
Select Cashier
- - - Deposit - Withdraw - Pay through cashier - - - -
-

No deposit complaints.

-
- -
-

No withdraw complaints.

-
- -
-

No pay through cashier complaints.

-
-
-
-
-

Settings

-
-

My FLO address

-
-

- - Copy - - - -
-
- Sign out -

Theme

-
-

Toggle dark theme

- -
-

Haptic feedback

-
-

Toggle haptic feedback. This will turn vibration feedback on/off.

- -
-
-

My UPI ID

-
-

Add your UPI addresses for withdrawing money from wallet back to your bank account.

- + Add UPI address - -
-
-
-
- - Go to activity page - - -

-
-
-

- Report -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/btcOperator.js b/scripts/btcOperator.js similarity index 100% rename from btcOperator.js rename to scripts/btcOperator.js diff --git a/compactIDB.js b/scripts/compactIDB.js similarity index 100% rename from compactIDB.js rename to scripts/compactIDB.js diff --git a/floBlockchainAPI.js b/scripts/floBlockchainAPI.js similarity index 100% rename from floBlockchainAPI.js rename to scripts/floBlockchainAPI.js diff --git a/floCloudAPI.js b/scripts/floCloudAPI.js similarity index 100% rename from floCloudAPI.js rename to scripts/floCloudAPI.js diff --git a/floCrypto.js b/scripts/floCrypto.js similarity index 100% rename from floCrypto.js rename to scripts/floCrypto.js diff --git a/floDapps.js b/scripts/floDapps.js similarity index 100% rename from floDapps.js rename to scripts/floDapps.js diff --git a/scripts/floExchangeAPI.js b/scripts/floExchangeAPI.js index 93f261f..685ba12 100644 --- a/scripts/floExchangeAPI.js +++ b/scripts/floExchangeAPI.js @@ -1,6 +1,6 @@ 'use strict'; -(function (EXPORTS) { //floExchangeAPI v1.2.0 +(function (EXPORTS) { //floExchangeAPI v1.2.0a const exchangeAPI = EXPORTS; const DEFAULT = { @@ -1731,19 +1731,20 @@ if (typeof nodes !== 'object' || nodes === null) throw Error('nodes must be an object') else - lastTx = parseInt(localStorage.getItem(_l('lastTx'))) || 0; + lastTx = localStorage.getItem(_l('lastTx')); } catch (error) { nodes = {}; trusted = new Set(); assets = new Set(); tags = new Set(); - lastTx = 0; } - floBlockchainAPI.readData(DEFAULT.marketID, { - ignoreOld: lastTx, - sentOnly: true, - pattern: DEFAULT.marketApp - }).then(result => { + + var query_options = { sentOnly: true, pattern: DEFAULT.marketApp }; + if (typeof lastTx == 'string' && /^[0-9a-f]{64}/i.test(lastTx))//lastTx is txid of last tx + query_options.after = lastTx; + else if (!isNaN(lastTx))//lastTx is tx count (*backward support) + query_options.ignoreOld = parseInt(lastTx); + floBlockchainAPI.readData(DEFAULT.marketID, query_options).then(result => { result.data.reverse().forEach(data => { var content = JSON.parse(data)[DEFAULT.marketApp]; //Node List @@ -1782,7 +1783,7 @@ tags.add(t); } }); - localStorage.setItem(_l('lastTx'), result.totalTxs); + localStorage.setItem(_l('lastTx'), result.lastItem); localStorage.setItem(_l('nodes'), JSON.stringify(nodes)); localStorage.setItem(_l('trusted'), Array.from(trusted).join(",")); localStorage.setItem(_l('assets'), Array.from(assets).join(",")); @@ -1910,4 +1911,4 @@ } } -})('object' === typeof module ? module.exports : window.floExchangeAPI = {}); +})('object' === typeof module ? module.exports : window.floExchangeAPI = {}); \ No newline at end of file diff --git a/floTokenAPI.js b/scripts/floTokenAPI.js similarity index 100% rename from floTokenAPI.js rename to scripts/floTokenAPI.js diff --git a/lib.js b/scripts/lib.js similarity index 100% rename from lib.js rename to scripts/lib.js