Compare commits

...

59 Commits
dev ... master

Author SHA1 Message Date
SaketAnand
a5934d830f
Update README.md
Some checks failed
Workflow push to Dappbundle / Build (push) Has been cancelled
2026-01-13 15:55:10 +05:30
SaketAnand
fc5f8b250f
Merge pull request #12 from void-57/patch-1
Change git push user in repopush workflow
2026-01-13 15:49:24 +05:30
66c96f06ea
Change git push user in repopush workflow 2026-01-13 01:23:15 +05:30
SaketAnand
f39de21198 updated default fee required for sending tokens
updated the send amount, fee required, and the minimum change amount needed for sending tokens using the "send token" section of the UI
2025-09-13 12:36:59 +05:30
SaketAnand
e3efa64271 Updated required FLO balance to send tokens
Updated required FLO balance from '0.001' to '0.00001' for sending tokens directly in the UI
2025-09-13 09:23:18 +05:30
31b0e5c81a
Update index.html 2025-09-01 07:29:36 +05:30
637c14952f
Fixing All, Sent, Mining classification 2025-08-20 17:20:49 +05:30
a0df5f1986
Update index.html 2025-08-20 12:46:44 +05:30
a7504d6248
Update index.min.html 2025-08-20 12:46:16 +05:30
7b2dae1b07
Update index.min.html 2025-08-20 12:38:43 +05:30
aa0f266dbb
Update index.html 2025-08-20 12:30:16 +05:30
280f06edc4
Update floBlockchainAPI.js 2025-08-20 11:52:52 +05:30
8e885c1728
Update repopush.yml 2025-08-20 11:47:42 +05:30
202db811fb
Update floBlockchainAPI.js 2025-08-20 11:41:33 +05:30
f237b82a14
Update index.html 2025-07-28 13:58:59 +05:30
2d64ece0c2
Update floBlockchainAPI.min.js 2025-07-28 13:55:14 +05:30
eecc5265ab
Update floBlockchainAPI.js 2025-07-28 13:54:51 +05:30
sairaj mote
ff4f9317a3 fixed issue with js converting decimal values to exponentials 2024-02-13 17:55:42 +05:30
sairaj mote
c6ce1876b2 Moving to new tor links 2024-01-21 01:27:35 +05:30
sairaj mote
60b4d0a34a alternate tor detection 2024-01-16 15:57:16 +05:30
sairaj mote
f4b437a085 API remapping 2024-01-09 03:27:02 +05:30
sairaj mote
9c28437106 shifting ranchimallflo api to v2 2024-01-09 03:21:23 +05:30
sairaj mote
a8dcc329cf testing tor API 2024-01-09 02:57:20 +05:30
sairaj mote
cdc44cb214 bug fix 2024-01-08 12:41:14 +05:30
sairaj mote
3eecc5e6b6 adding tor API endpoint 2024-01-08 03:16:49 +05:30
sairaj mote
eecc7c7f76 Update repopush.yml 2023-12-18 20:23:02 +05:30
sairaj mote
c2fc8ca834 Create repopush.yml 2023-12-18 19:58:44 +05:30
sairaj mote
e4da4e7039 Bug fix
-- fixed address selection not working from saved address list picker
2023-10-23 03:01:16 +05:30
sairaj mote
80e17078ef Added unconfirmed tx checking before new transaction 2023-10-19 16:34:30 +05:30
sairaj mote
ff3021b49d Bug fix 2023-10-09 13:39:57 +05:30
sairaj mote
1e526f2d19 Code refactoring 2023-10-05 02:21:57 +05:30
sairaj mote
8f0de4b0f0 UI improvements 2023-10-04 03:13:04 +05:30
sairaj mote
fc2dafa686 Bug fixes 2023-10-03 04:39:24 +05:30
sairaj mote
39498d499b Code refactoring 2023-10-01 22:52:05 +05:30
sairaj mote
24996890d5 added more smart contract creation checks
-- Only one smart contract allowed per address
-- Payee addresses can't include creator address
2023-10-01 22:14:49 +05:30
sairaj mote
6ba663ecaa Updated components 2023-10-01 05:43:07 +05:30
sairaj mote
332ff32e1c Bug fixes and UI improvements 2023-09-28 04:59:51 +05:30
sairaj mote
5dadcf1164 Bug fixes 2023-09-27 22:14:03 +05:30
sairaj mote
ab12537dfe Bug fixes 2023-09-27 19:39:38 +05:30
sairaj mote
42140d541c Update components.js 2023-09-26 18:38:33 +05:30
sairaj mote
8a94cffe27 UI enhancements 2023-09-26 17:51:25 +05:30
sairaj mote
49a76c0f16 Update index.html 2023-09-26 15:33:28 +05:30
sairaj mote
131ecf5bb4 Update index.html 2023-09-25 03:22:52 +05:30
sairaj mote
008231738e Update index.html 2023-09-25 03:13:07 +05:30
sairaj mote
deb352cf03 Update index.html 2023-09-25 03:11:30 +05:30
sairaj mote
1ebbf51bb4 Bug fix 2023-09-25 02:51:21 +05:30
sairaj mote
af0ecf4a13 Update index.html 2023-09-25 02:12:36 +05:30
sairaj mote
8b6f8cac7d Bug fixes 2023-09-24 04:19:19 +05:30
sairaj mote
1b79c0c351 Update index.html 2023-09-23 01:30:17 +05:30
sairaj mote
b8e1fab1c4 Update index.html 2023-09-23 01:26:07 +05:30
sairaj mote
f943ea4609 Bug fix 2023-09-14 16:05:57 +05:30
sairaj mote
14eb4525ae UX improvement 2023-08-23 01:25:56 +05:30
sairaj mote
bc08c455da UI bug fixes 2023-08-15 20:06:41 +05:30
sairaj mote
0a49a735db Bug fix 2023-07-23 16:13:12 +05:30
SaketAnand
5e39a7ca99
Update README.md 2023-07-19 17:42:40 +05:30
sairaj mote
35f22f9e4d UX improvement and code refactoring 2023-07-18 19:49:58 +05:30
SaketAnand
63599dec2d
Update README.md 2023-07-13 01:35:50 +05:30
sairaj mote
a3d082f1d2 Rendering optimization 2023-07-06 18:46:56 +05:30
sairaj mote
9983059012
Merge pull request #11 from ranchimall/dev
Blockbook based UI and backend
2023-07-06 18:32:33 +05:30
14 changed files with 4309 additions and 716 deletions

32
.github/workflows/repopush.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Workflow push to Dappbundle
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Executing remote command
uses: appleboy/ssh-action@v1.0.0
with:
host: ${{ secrets.R_HOST }}
username: ${{ secrets.P_USERNAME }}
password: ${{ secrets.P_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
script: |
if [ -d "${{ secrets.DEPLOYMENT_LOCATION}}/dappbundle" ]; then
echo "Folder exists. Skipping Git clone."
else
echo "Folder does not exist. Cloning repository..."
cd ${{ secrets.DEPLOYMENT_LOCATION}}/ && git clone https://github.com/ranchimall/dappbundle.git
fi
if [ -d "${{ secrets.DEPLOYMENT_LOCATION}}/dappbundle/${{ github.event.repository.name }}" ]; then
echo "Repository exists. Remove folder "
rm -r "${{ secrets.DEPLOYMENT_LOCATION}}/dappbundle/${{ github.event.repository.name }}"
fi
echo "Cloning repository..."
cd ${{ secrets.DEPLOYMENT_LOCATION}}/dappbundle && git clone https://github.com/ranchimall/${{ github.event.repository.name }}
cd "${{ secrets.DEPLOYMENT_LOCATION}}/dappbundle/${{ github.event.repository.name }}" && rm -rf .gitattributes .git .github .gitignore
cd ${{ secrets.DEPLOYMENT_LOCATION}}/dappbundle/ && git add . && git commit -m "Workflow updating files of ${{ github.event.repository.name }}" && git push "https://saketongit:${{ secrets.RM_ACCESS_TOKEN }}@github.com/ranchimall/dappbundle.git"

View File

@ -1,73 +1,76 @@
# FLO_webWallet # FLO Wallet
FLO Web Wallet RanchiMall FLO Web Wallet
These are client side scripts that can generate FLO addresses, send FLO transactions to the blockchain and monitor FLO data from the blockchain These are client-side scripts that can generate FLO addresses, send FLO transactions to the blockchain and monitor FLO data from the blockchain
NOTE : Use respective file for mainnet and testnet NOTE: Use respective file for mainnet and testnet
### Live URL for FLO Wallet:
*https://ranchimall.github.io/flowallet/*
## Instructions to use ## Instructions to use
Note : Web wallet uses IndedxedDB for storing data, which means data is stored in respective browser you used to open web wallet.Data stored by one browser can't be accessed by other browser. Note: Web wallet uses IndedxedDB for storing data, which means data is stored in the respective browser you used to open web wallet. Data stored by one browser can't be accessed by other browsers.
There are 4 pages in this web app : There are 4 pages in this web app :
---------------------- ----------------------
### Monitor FLO Data ### Monitor FLO Data
This apge allows user to view the transactions done by the given address/es. This app allows users to view the transactions done by the given address/es.
1. Click/Tap on the '+' floating button at bottom-right hand side, which opens a popup window. 1. Click/Tap on the '+' floating button at bottom-right hand side, which opens a popup window.
2. Enter the FLO address that you want to monitor, You can also specify a label to that address which will be displayed as name for that address.If you left label field empty, the default label will be 'Unknown'. 2. Enter the FLO address that you want to monitor, You can also specify a label for that address which will be displayed as a name for that address. If you left the label field empty, the default label will be 'Unknown'.
3. Click/Tap on 'Ok' and the address you added will be displayed on monitoring page as a card.This address is also added to your local database.Once you add an address/label pair, It will stay there untill you clear data(Option available in Settings page). 3. Click/Tap on 'Ok' and the address you added will be displayed on the monitoring page as a card. This address is also added to your local database. Once you add an address/label pair, It will stay there until you clear data(Option available on Settings page).
4. When you hover mouse pointer on a monitoring card, three dots will appear. clicking on this allows user to edit or remove that address from monitoring list.(On mobile devices this option is always visible) 4. When you hover the mouse pointer on a monitoring card, three dots will appear. clicking on this allows the user to edit or remove that address from the monitoring list.(On mobile devices this option is always visible)
5. To see transactions done by any address, click/Tap on respective address card.It will open an follow up window, which displays transactions in messege format. consisting of data sent/received to/from, date of transaction and FLO data. Arrows on messege body indicate direction of transaction i.e. Data is sent or received.On the top of window we have option to go back to monitoring page or refresh the transaction history. 5. To see transactions done by any address, click/Tap on the respective address card. It will open a follow-up window, which displays transactions in the message format. consisting of data sent/received to/from, date of transaction, and FLO data. Arrows on the message body indicate the direction of the transaction i.e. Data is sent or received. On the top of the window, we have the option to go back to the monitoring page or refresh the transaction history.
### Send FLO Data ### Send FLO Data
This page allows user to send FLO data and transactions to the blockchain.To send any data you have to check your balance first, to make sure you have enough balance as each transaction requires 0.0005 FLOs to be valid. This page allows users to send FLO data and transactions to the blockchain. To send any data you have to check your balance first, to make sure you have enough balance as each transaction requires 0.0005 FLOs to be valid.
1. Enter the sender's address 1. Enter the sender's address
2. Click check balance. 2. Click check balance.
3. Balance of the respective address will be displayed 3. Balance of the respective address will be displayed
4. Enter the Receiver's address 4. Enter the Receiver's address
5. Enter amount 5. Enter the amount
6. Enter FLO data (if required) 6. Enter FLO data (if required)
7. Click Send 7. Click Send
8. Enter the private key for the address in the prompt 8. Enter the private key for the address in the prompt
9. The transaction will be sent to the blockchain and returns the txid (returns error if any). 9. The transaction will be sent to the blockchain and returns the txid (returns error if any).
Note : Transcation fee is set to 0.0005 Note: Transaction fee is set to 0.0005
### FLO address generation/recovery page ### FLO address generation/recovery page
This page can be used to generate or recover FLO address and private key pairs.This page has two buttons This page can be used to generate or recover FLO addresses and private key pairs. This page has two buttons
#### generate new address #### generate a new address
As the name implies this button when clicked/tapped generates new FLO address and private key pair.Also there is an one click/tap option that allows user to copy FLO address or private key. As the name implies this button when clicked/tapped generates a new FLO address and private key pair. Also, there is a one-click/tap option that allows the user to copy the FLO address or private key.
#### recover FLO address #### Recover FLO address
This button when click/tapped opens a popup, which prompts user to enter private key associated with the FLO address that has to be recovered. Once correct private key is entered corresponding FLO address is displayed again. This button when click/tapped opens a popup, which prompts the user to enter private key associated with the FLO address that has to be recovered. Once the correct private key is entered corresponding FLO address is displayed again.
Note : Do not share your private key with anyone and keep it safe. Once lost a private key can't be recovered. Note: Do not share your private key with anyone and keep it safe. Once lost a private key can't be recovered.
### Settings page ### Settings page
This page contains settings and information about webapp. This page contains settings and information about Webapp.
#### Dark mode setting #### Dark mode setting
This section allows user to set color scheme (light/dark) with two options, either automatic or manual. This section allows the user to set a color scheme (light/dark) with two options, either automatic or manual.
1. Automatic - If this toggle is turned on, Dark mode is enabled automatically from 6pm to 6am(Custom timing will be added in future versions). 1. Automatic - If this toggle is turned on, Dark mode is enabled automatically from 6 pm to 6 am (Custom timing will be added in future versions).
2. Manual - Turning this toggle on/off changes color scheme and stayes in that mode unless changed by user again. 2. Manual - Turning this toggle on/off changes the color scheme and stays in that mode unless changed by the user again.
#### CLear all local data #### CLear all local data
This option clears all the data stored in IndexedDB databases from browser. This is same as clearing browser data and cache.After deleting data, it may take more time to load transactions as they are now fetched again from blockchain. Also you have to add addresses to start monitoring again. This option clears all the data stored in IndexedDB databases from the browser. This is the same as clearing browser data and cache. After deleting data, it may take more time to load transactions as they are now fetched again from the blockchain. Also, you have to add addresses to start monitoring again.
#### About #### About
This section contains information about version and underlying technologies. This section contains information about the version and underlying technologies.
Note : For reducing API calls and processing time , monitored data are stored in local browser. While monitoring the same address, the data from browser database (IndexedDB) is used and only the new transactions are obtained using API. Note: For reducing API calls and processing time, monitored data are stored in the local browser. While monitoring the same address, the data from the browser database (IndexedDB) is used and only the new transactions are obtained using API.

View File

@ -16,7 +16,7 @@ body {
body { body {
--accent-color: #256eff; --accent-color: #256eff;
--text-color: 20, 20, 20; --text-color: 34, 34, 34;
--background-color: 240, 240, 240; --background-color: 240, 240, 240;
--foreground-color: 250, 250, 250; --foreground-color: 250, 250, 250;
--danger-color: rgb(255, 75, 75); --danger-color: rgb(255, 75, 75);
@ -25,7 +25,6 @@ body {
scrollbar-gutter: stable; scrollbar-gutter: stable;
color: rgba(var(--text-color), 1); color: rgba(var(--text-color), 1);
background-color: rgba(var(--background-color), 1); background-color: rgba(var(--background-color), 1);
transition: background-color 0.3s;
--dark-red: #d40e1e; --dark-red: #d40e1e;
--red: #f50000; --red: #f50000;
--kinda-pink: #e40273; --kinda-pink: #e40273;
@ -608,7 +607,6 @@ h3 {
height: 100%; height: 100%;
width: 100%; width: 100%;
background-color: rgba(var(--foreground-color), 1); background-color: rgba(var(--foreground-color), 1);
transition: background-color 0.3s;
} }
#pages_container { #pages_container {
@ -647,10 +645,7 @@ h3 {
border-radius: 0.3rem; border-radius: 0.3rem;
text-align: center; text-align: center;
} }
.nav-item .icon { .nav-item .icon, .nav-item__title {
transition: transform 0.2s;
}
.nav-item__title {
transition: opacity 0.2s, transform 0.2s; transition: opacity 0.2s, transform 0.2s;
} }
.nav-item--active { .nav-item--active {
@ -669,12 +664,17 @@ h3 {
z-index: 1; z-index: 1;
} }
::view-transition {
transition: 0.3s;
}
#fix_invalid_button { #fix_invalid_button {
margin-bottom: 1rem !important; margin-bottom: 1rem !important;
} }
.password-field label { .password-field label {
display: flex; display: flex;
flex-shrink: 0;
} }
.password-field label input:checked ~ .visible { .password-field label input:checked ~ .visible {
display: none; display: none;
@ -754,6 +754,16 @@ h3 {
position: relative; position: relative;
height: 100%; height: 100%;
} }
#search sm-chips,
#search #pagination_wrapper {
background-color: rgba(var(--text-color), 0.06);
border-radius: 0.7rem;
padding: 0.3rem;
}
#search .pagination__item:not(.pagination__item--active) {
background-color: rgba(var(--text-color), 0.06);
color: rgba(var(--text-color), 1);
}
#queried_flo_address h4 { #queried_flo_address h4 {
font-size: 1.1rem; font-size: 1.1rem;
@ -795,6 +805,9 @@ h3 {
color: rgba(var(--text-color), 0.9); color: rgba(var(--text-color), 0.9);
font-weight: 500; font-weight: 500;
} }
.transaction__receiver:hover {
color: var(--accent-color);
}
.transaction__amount { .transaction__amount {
font-weight: 700; font-weight: 700;
} }
@ -977,7 +990,7 @@ h3 {
#transaction_result { #transaction_result {
display: grid; display: grid;
gap: 0.5rem; gap: 1.5rem;
height: max(40vh, 24rem); height: max(40vh, 24rem);
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -991,7 +1004,7 @@ h3 {
text-align: center; text-align: center;
width: 100%; width: 100%;
} }
#transaction_result .icon { #transaction_result > .icon {
justify-self: center; justify-self: center;
height: 4rem; height: 4rem;
width: 4rem; width: 4rem;
@ -1000,18 +1013,21 @@ h3 {
-webkit-animation: popup 1s; -webkit-animation: popup 1s;
animation: popup 1s; animation: popup 1s;
} }
#transaction_result .icon--success { #transaction_result > .icon--success {
fill: rgba(var(--background-color), 1); fill: rgba(var(--background-color), 1);
padding: 1rem; padding: 1rem;
background-color: #0bbe56; background-color: #0bbe56;
} }
#transaction_result .icon--failed { #transaction_result > .icon--failed {
background-color: rgba(var(--text-color), 0.03); background-color: rgba(var(--text-color), 0.03);
fill: var(--danger-color); fill: var(--danger-color);
} }
#transaction_result sm-copy { #transaction_result sm-copy {
font-size: 0.8rem; font-size: 0.8rem;
} }
#transaction_result #transaction_link {
justify-self: center;
}
@-webkit-keyframes popup { @-webkit-keyframes popup {
0% { 0% {
@ -1058,23 +1074,14 @@ h3 {
padding-bottom: 4rem; padding-bottom: 4rem;
} }
#pagination_wrapper { #pagination_wrapper:empty {
position: fixed; display: none !important;
bottom: 0;
right: 0;
margin: 0 auto;
padding: 0.5rem;
background-color: rgba(var(--foreground-color), 1);
z-index: 5;
border-radius: 0.7rem;
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
margin: 0.5rem;
} }
.pagination__item { .pagination__item {
display: flex; display: flex;
padding: 0.2rem 0.5rem; padding: 0.2rem 0.5rem;
border-radius: 0.3rem; border-radius: 0.5rem;
} }
.pagination__item--active { .pagination__item--active {
background-color: var(--accent-color); background-color: var(--accent-color);
@ -1247,15 +1254,6 @@ legend,
transform: translateY(100%); transform: translateY(100%);
opacity: 0; opacity: 0;
} }
#pagination_wrapper {
margin: 0;
margin-bottom: 4.8rem;
left: 50%;
right: auto;
transform: translateX(-50%);
width: calc(100vw - 2rem);
flex-wrap: wrap;
}
} }
@media screen and (min-width: 40rem) { @media screen and (min-width: 40rem) {
sm-popup { sm-popup {
@ -1282,6 +1280,38 @@ legend,
#pages_container { #pages_container {
grid-area: main; grid-area: main;
} }
::view-transition-old(pages-container) {
-webkit-animation: slide-out-right 0.3s;
animation: slide-out-right 0.3s;
}
@-webkit-keyframes slide-out-right {
to {
opacity: 0;
transform: translateX(1rem);
}
}
@keyframes slide-out-right {
to {
opacity: 0;
transform: translateX(1rem);
}
}
::view-transition-new(pages-container) {
-webkit-animation: slide-in-right 0.3s;
animation: slide-in-right 0.3s;
}
@-webkit-keyframes slide-in-right {
from {
opacity: 0;
transform: translateX(-1rem);
}
}
@keyframes slide-in-right {
from {
opacity: 0;
transform: translateX(-1rem);
}
}
.page { .page {
padding: 0 1.5rem; padding: 0 1.5rem;
} }
@ -1343,11 +1373,6 @@ legend,
margin: auto; margin: auto;
width: min(36rem, 100%); width: min(36rem, 100%);
} }
#smart_contract_creation_form::part(form).split-layout {
grid-template-columns: 1fr 1.5fr;
align-items: flex-start;
width: min(50rem, 100%);
}
.payee-address-wrapper { .payee-address-wrapper {
display: grid; display: grid;
grid-template-columns: 1fr 8rem 3rem; grid-template-columns: 1fr 8rem 3rem;
@ -1408,4 +1433,13 @@ legend,
} }
.hidden { .hidden {
display: none !important; display: none !important;
}
@media (prefers-reduced-motion) {
::view-transition-group(*),
::view-transition-old(*),
::view-transition-new(*) {
-webkit-animation: none !important;
animation: none !important;
}
} }

2
css/main.min.css vendored

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@ body {
body { body {
--accent-color: #256eff; --accent-color: #256eff;
--text-color: 20, 20, 20; --text-color: 34, 34, 34;
--background-color: 240, 240, 240; --background-color: 240, 240, 240;
--foreground-color: 250, 250, 250; --foreground-color: 250, 250, 250;
--danger-color: rgb(255, 75, 75); --danger-color: rgb(255, 75, 75);
@ -25,7 +25,6 @@ body {
scrollbar-gutter: stable; scrollbar-gutter: stable;
color: rgba(var(--text-color), 1); color: rgba(var(--text-color), 1);
background-color: rgba(var(--background-color), 1); background-color: rgba(var(--background-color), 1);
transition: background-color 0.3s;
// Accent colors // Accent colors
--dark-red: #d40e1e; --dark-red: #d40e1e;
--red: #f50000; --red: #f50000;
@ -580,13 +579,11 @@ h3 {
height: 100%; height: 100%;
width: 100%; width: 100%;
background-color: rgba(var(--foreground-color), 1); background-color: rgba(var(--foreground-color), 1);
transition: background-color 0.3s;
} }
#pages_container { #pages_container {
flex: 1; flex: 1;
overflow-y: auto; overflow-y: auto;
} }
#main_navbar { #main_navbar {
display: flex; display: flex;
background: rgba(var(--text-color), 0.03); background: rgba(var(--text-color), 0.03);
@ -616,9 +613,7 @@ h3 {
font-size: 0.7rem; font-size: 0.7rem;
border-radius: 0.3rem; border-radius: 0.3rem;
text-align: center; text-align: center;
.icon { .icon,
transition: transform 0.2s;
}
&__title { &__title {
transition: opacity 0.2s, transform 0.2s; transition: opacity 0.2s, transform 0.2s;
} }
@ -636,8 +631,12 @@ h3 {
background: var(--accent-color); background: var(--accent-color);
border-radius: 1rem 1rem 0 0; border-radius: 1rem 1rem 0 0;
z-index: 1; z-index: 1;
// view-transition-name: indicator;
} }
} }
::view-transition {
transition: 0.3s;
}
#fix_invalid_button { #fix_invalid_button {
margin-bottom: 1rem !important; margin-bottom: 1rem !important;
@ -646,6 +645,7 @@ h3 {
.password-field { .password-field {
label { label {
display: flex; display: flex;
flex-shrink: 0;
input:checked ~ .visible { input:checked ~ .visible {
display: none; display: none;
} }
@ -720,6 +720,18 @@ h3 {
#search { #search {
position: relative; position: relative;
height: 100%; height: 100%;
sm-chips,
#pagination_wrapper {
background-color: rgba(var(--text-color), 0.06);
border-radius: 0.7rem;
padding: 0.3rem;
}
.pagination__item {
&:not(.pagination__item--active) {
background-color: rgba(var(--text-color), 0.06);
color: rgba(var(--text-color), 1);
}
}
} }
#queried_flo_address { #queried_flo_address {
h4 { h4 {
@ -760,6 +772,9 @@ h3 {
margin-left: 0.5rem; margin-left: 0.5rem;
color: rgba(var(--text-color), 0.9); color: rgba(var(--text-color), 0.9);
font-weight: 500; font-weight: 500;
&:hover {
color: var(--accent-color);
}
} }
&__amount { &__amount {
font-weight: 700; font-weight: 700;
@ -944,7 +959,7 @@ h3 {
} }
#transaction_result { #transaction_result {
display: grid; display: grid;
gap: 0.5rem; gap: 1.5rem;
height: max(40vh, 24rem); height: max(40vh, 24rem);
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -957,7 +972,7 @@ h3 {
text-align: center; text-align: center;
width: 100%; width: 100%;
} }
.icon { & > .icon {
justify-self: center; justify-self: center;
height: 4rem; height: 4rem;
width: 4rem; width: 4rem;
@ -977,6 +992,9 @@ h3 {
sm-copy { sm-copy {
font-size: 0.8rem; font-size: 0.8rem;
} }
#transaction_link {
justify-self: center;
}
} }
@keyframes popup { @keyframes popup {
0% { 0% {
@ -1003,21 +1021,14 @@ h3 {
padding-bottom: 4rem; padding-bottom: 4rem;
} }
#pagination_wrapper { #pagination_wrapper {
position: fixed; &:empty {
bottom: 0; display: none !important;
right: 0; }
margin: 0 auto;
padding: 0.5rem;
background-color: rgba(var(--foreground-color), 1);
z-index: 5;
border-radius: 0.7rem;
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
margin: 0.5rem;
} }
.pagination__item { .pagination__item {
display: flex; display: flex;
padding: 0.2rem 0.5rem; padding: 0.2rem 0.5rem;
border-radius: 0.3rem; border-radius: 0.5rem;
&--active { &--active {
background-color: var(--accent-color); background-color: var(--accent-color);
color: rgba(var(--background-color), 1); color: rgba(var(--background-color), 1);
@ -1191,15 +1202,6 @@ legend,
} }
} }
} }
#pagination_wrapper {
margin: 0;
margin-bottom: 4.8rem;
left: 50%;
right: auto;
transform: translateX(-50%);
width: calc(100vw - 2rem);
flex-wrap: wrap;
}
} }
@media screen and (min-width: 40rem) { @media screen and (min-width: 40rem) {
sm-popup { sm-popup {
@ -1228,6 +1230,24 @@ legend,
#pages_container { #pages_container {
grid-area: main; grid-area: main;
} }
::view-transition-old(pages-container) {
animation: slide-out-right 0.3s;
}
@keyframes slide-out-right {
to {
opacity: 0;
transform: translateX(1rem);
}
}
::view-transition-new(pages-container) {
animation: slide-in-right 0.3s;
}
@keyframes slide-in-right {
from {
opacity: 0;
transform: translateX(-1rem);
}
}
.page { .page {
padding: 0 1.5rem; padding: 0 1.5rem;
} }
@ -1290,11 +1310,6 @@ legend,
gap: 1.5rem; gap: 1.5rem;
margin: auto; margin: auto;
width: min(36rem, 100%); width: min(36rem, 100%);
&.split-layout {
grid-template-columns: 1fr 1.5fr;
align-items: flex-start;
width: min(50rem, 100%);
}
} }
.payee-address-wrapper { .payee-address-wrapper {
display: grid; display: grid;
@ -1363,3 +1378,10 @@ legend,
.hidden { .hidden {
display: none !important; display: none !important;
} }
@media (prefers-reduced-motion) {
::view-transition-group(*),
::view-transition-old(*),
::view-transition-new(*) {
animation: none !important;
}
}

1163
index.html

File diff suppressed because it is too large Load Diff

3353
index.min.html Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

1
scripts/components.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -49,63 +49,80 @@
} }
function formatTx(address, tx) { function formatTx(address, tx) {
let result = { const result = {
time: tx.time, time: tx.time,
block: tx.blockheight, block: tx.blockheight,
blockhash: tx.blockhash, blockhash: tx.blockhash,
txid: tx.txid, txid: tx.txid,
floData: tx.floData, floData: tx.floData,
confirmations: tx.confirmations confirmations: tx.confirmations
} };
//format receivers // ---- Receivers (outputs) ----
let receivers = {}; const receivers = {};
for (let vout of tx.vout) { for (const vout of tx.vout || []) {
if (vout.scriptPubKey.isAddress) { const outAddrs =
let id = vout.scriptPubKey.addresses[0]; (vout.addresses && vout.addresses.length ? vout.addresses :
if (id in receivers) vout.scriptPubKey && vout.scriptPubKey.addresses ? vout.scriptPubKey.addresses : null);
receivers[id] += vout.value; if (outAddrs && outAddrs.length) {
else receivers[id] = vout.value; const id = outAddrs[0];
} receivers[id] = (receivers[id] || 0) + Number(vout.value || 0);
} }
result.receivers = receivers; }
//format senders (or mined) result.receivers = receivers;
if (!tx.vin[0].isAddress) { //mined (ie, coinbase)
let coinbase = tx.vin[0].coinbase;
result.mine = coinbase;
result.mined = { [coinbase]: tx.valueOut }
} else {
result.sender = tx.vin[0].addresses[0];
result.receiver = tx.vout[0].scriptPubKey.addresses[0];
result.fees = tx.fees;
let senders = {};
for (let vin of tx.vin) {
if (vin.isAddress) {
let id = vin.addresses[0];
if (id in senders)
senders[id] += vin.value;
else senders[id] = vin.value;
}
}
result.senders = senders;
//remove change amounts // ---- Coinbase vs normal ----
for (let id in senders) { const isCoinbase = !!(tx.vin && tx.vin[0] && tx.vin[0].coinbase);
if (id in receivers) {
if (senders[id] > receivers[id]) {
senders[id] -= receivers[id];
delete receivers[id];
} else if (senders[id] < receivers[id]) { //&& id != address
receivers[id] -= senders[id];
delete senders[id];
}
}
}
}
if (isCoinbase) {
const coinbase = tx.vin[0].coinbase; // string
result.mine = coinbase;
result.mined = { [coinbase]: Number(tx.valueOut || 0) };
return result; return result;
}
// ---- Normal tx: senders, fees, first-party heuristics ----
result.fees = tx.fees;
const firstInAddr = (tx.vin && tx.vin[0] && tx.vin[0].addresses && tx.vin[0].addresses[0]) || undefined;
const firstOutAddrs =
(tx.vout && tx.vout[0] &&
((tx.vout[0].addresses && tx.vout[0].addresses[0]) ||
(tx.vout[0].scriptPubKey && tx.vout[0].scriptPubKey.addresses && tx.vout[0].scriptPubKey.addresses[0]))) || undefined;
if (firstInAddr) result.sender = firstInAddr;
if (firstOutAddrs) result.receiver = firstOutAddrs;
const senders = {};
for (const vin of tx.vin || []) {
const inAddrs = vin.addresses;
if (inAddrs && inAddrs.length) {
const id = inAddrs[0];
senders[id] = (senders[id] || 0) + Number(vin.value || 0);
}
}
result.senders = senders;
// ---- Remove change (net flow) ----
for (const id of Object.keys(senders)) {
if (receivers[id] != null) {
if (senders[id] > receivers[id]) {
senders[id] -= receivers[id];
delete receivers[id];
} else if (senders[id] < receivers[id]) {
receivers[id] -= senders[id];
delete senders[id];
} else {
// equal -> cancel both
delete senders[id];
delete receivers[id];
}
}
}
return result;
} }
floWebWallet.listTransactions = function (address, page_options = {}) { floWebWallet.listTransactions = function (address, page_options = {}) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let options = {}; let options = {};
@ -141,4 +158,4 @@
}) })
} }
})(window.floWebWallet = {}); })(window.floWebWallet = {});

View File

@ -1,4 +1,4 @@
(function (EXPORTS) { //floBlockchainAPI v3.0.1b (function (EXPORTS) { //floBlockchainAPI v3.1.4
/* FLO Blockchain Operator to send/receive data from blockchain using API calls via FLO Blockbook*/ /* FLO Blockchain Operator to send/receive data from blockchain using API calls via FLO Blockbook*/
'use strict'; 'use strict';
const floBlockchainAPI = EXPORTS; const floBlockchainAPI = EXPORTS;
@ -7,17 +7,36 @@
blockchain: floGlobals.blockchain, blockchain: floGlobals.blockchain,
apiURL: { apiURL: {
FLO: ['https://blockbook.ranchimall.net/'], FLO: ['https://blockbook.ranchimall.net/'],
FLO_TEST: [] FLO_TEST: ['https://blockbook-testnet.ranchimall.net/']
}, },
sendAmt: 0.0003, sendAmt: 0.00001,
fee: 0.0002, fee: 0.00001,
minChangeAmt: 0.0002, minChangeAmt: 0.00001,
receiverID: floGlobals.adminID receiverID: floGlobals.adminID
}; };
const SATOSHI_IN_BTC = 1e8; const SATOSHI_IN_BTC = 1e8;
const isUndefined = val => typeof val === 'undefined'; const isUndefined = val => typeof val === 'undefined';
const checkIfTor = floBlockchainAPI.checkIfTor = () => {
return fetch('https://check.torproject.org/api/ip')
.then(res => res.json())
.then(res => {
return res.IsTor
}).catch(e => {
console.error(e)
return false
})
}
let isTor = false;
checkIfTor().then(result => {
isTor = result
if (isTor) {
DEFAULT.apiURL.FLO.push('http://xge4kejxl6xs4cad3u3a7dnw7idndlkn3vmyo33t3a4ctk566y65eoad.onion/')
DEFAULT.apiURL.FLO_TEST.push('http://fdjrsde2qhfecvx6fkgmcidwkp34bdek7jo4y2fpqatrhzxtxkk6f4ad.onion/')
}
});
const util = floBlockchainAPI.util = {}; const util = floBlockchainAPI.util = {};
util.Sat_to_FLO = value => parseFloat((value / SATOSHI_IN_BTC).toFixed(8)); util.Sat_to_FLO = value => parseFloat((value / SATOSHI_IN_BTC).toFixed(8));
@ -1041,4 +1060,4 @@
}) })
} }
})('object' === typeof module ? module.exports : window.floBlockchainAPI = {}); })('object' === typeof module ? module.exports : window.floBlockchainAPI = {});

1
scripts/floBlockchainAPI.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
scripts/floTokenAPI.min.js vendored Normal file

File diff suppressed because one or more lines are too long