Compare commits
59 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5934d830f | ||
|
|
fc5f8b250f | ||
| 66c96f06ea | |||
|
|
f39de21198 | ||
|
|
e3efa64271 | ||
| 31b0e5c81a | |||
| 637c14952f | |||
| a0df5f1986 | |||
| a7504d6248 | |||
| 7b2dae1b07 | |||
| aa0f266dbb | |||
| 280f06edc4 | |||
| 8e885c1728 | |||
| 202db811fb | |||
| f237b82a14 | |||
| 2d64ece0c2 | |||
| eecc5265ab | |||
|
|
ff4f9317a3 | ||
|
|
c6ce1876b2 | ||
|
|
60b4d0a34a | ||
|
|
f4b437a085 | ||
|
|
9c28437106 | ||
|
|
a8dcc329cf | ||
|
|
cdc44cb214 | ||
|
|
3eecc5e6b6 | ||
|
|
eecc7c7f76 | ||
|
|
c2fc8ca834 | ||
|
|
e4da4e7039 | ||
|
|
80e17078ef | ||
|
|
ff3021b49d | ||
|
|
1e526f2d19 | ||
|
|
8f0de4b0f0 | ||
|
|
fc2dafa686 | ||
|
|
39498d499b | ||
|
|
24996890d5 | ||
|
|
6ba663ecaa | ||
|
|
332ff32e1c | ||
|
|
5dadcf1164 | ||
|
|
ab12537dfe | ||
|
|
42140d541c | ||
|
|
8a94cffe27 | ||
|
|
49a76c0f16 | ||
|
|
131ecf5bb4 | ||
|
|
008231738e | ||
|
|
deb352cf03 | ||
|
|
1ebbf51bb4 | ||
|
|
af0ecf4a13 | ||
|
|
8b6f8cac7d | ||
|
|
1b79c0c351 | ||
|
|
b8e1fab1c4 | ||
|
|
f943ea4609 | ||
|
|
14eb4525ae | ||
|
|
bc08c455da | ||
|
|
0a49a735db | ||
|
|
5e39a7ca99 | ||
|
|
35f22f9e4d | ||
|
|
63599dec2d | ||
|
|
a3d082f1d2 | ||
|
|
9983059012 |
32
.github/workflows/repopush.yml
vendored
Normal file
32
.github/workflows/repopush.yml
vendored
Normal 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"
|
||||||
49
README.md
49
README.md
@ -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 6 pm to 6 am (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.
|
||||||
|
|||||||
108
css/main.css
108
css/main.css
@ -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;
|
||||||
@ -1409,3 +1434,12 @@ 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
2
css/main.min.css
vendored
File diff suppressed because one or more lines are too long
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
677
index.html
677
index.html
File diff suppressed because it is too large
Load Diff
3353
index.min.html
Normal file
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
1
scripts/components.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -49,56 +49,72 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
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;
|
result.receivers = receivers;
|
||||||
//format senders (or mined)
|
|
||||||
if (!tx.vin[0].isAddress) { //mined (ie, coinbase)
|
// ---- Coinbase vs normal ----
|
||||||
let coinbase = tx.vin[0].coinbase;
|
const isCoinbase = !!(tx.vin && tx.vin[0] && tx.vin[0].coinbase);
|
||||||
|
|
||||||
|
if (isCoinbase) {
|
||||||
|
const coinbase = tx.vin[0].coinbase; // string
|
||||||
result.mine = coinbase;
|
result.mine = coinbase;
|
||||||
result.mined = { [coinbase]: tx.valueOut }
|
result.mined = { [coinbase]: Number(tx.valueOut || 0) };
|
||||||
} else {
|
return result;
|
||||||
result.sender = tx.vin[0].addresses[0];
|
}
|
||||||
result.receiver = tx.vout[0].scriptPubKey.addresses[0];
|
|
||||||
|
// ---- Normal tx: senders, fees, first-party heuristics ----
|
||||||
result.fees = tx.fees;
|
result.fees = tx.fees;
|
||||||
let senders = {};
|
|
||||||
for (let vin of tx.vin) {
|
const firstInAddr = (tx.vin && tx.vin[0] && tx.vin[0].addresses && tx.vin[0].addresses[0]) || undefined;
|
||||||
if (vin.isAddress) {
|
const firstOutAddrs =
|
||||||
let id = vin.addresses[0];
|
(tx.vout && tx.vout[0] &&
|
||||||
if (id in senders)
|
((tx.vout[0].addresses && tx.vout[0].addresses[0]) ||
|
||||||
senders[id] += vin.value;
|
(tx.vout[0].scriptPubKey && tx.vout[0].scriptPubKey.addresses && tx.vout[0].scriptPubKey.addresses[0]))) || undefined;
|
||||||
else senders[id] = vin.value;
|
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;
|
result.senders = senders;
|
||||||
|
|
||||||
//remove change amounts
|
// ---- Remove change (net flow) ----
|
||||||
for (let id in senders) {
|
for (const id of Object.keys(senders)) {
|
||||||
if (id in receivers) {
|
if (receivers[id] != null) {
|
||||||
if (senders[id] > receivers[id]) {
|
if (senders[id] > receivers[id]) {
|
||||||
senders[id] -= receivers[id];
|
senders[id] -= receivers[id];
|
||||||
delete receivers[id];
|
delete receivers[id];
|
||||||
} else if (senders[id] < receivers[id]) { //&& id != address
|
} else if (senders[id] < receivers[id]) {
|
||||||
receivers[id] -= senders[id];
|
receivers[id] -= senders[id];
|
||||||
delete senders[id];
|
delete senders[id];
|
||||||
}
|
} else {
|
||||||
|
// equal -> cancel both
|
||||||
|
delete senders[id];
|
||||||
|
delete receivers[id];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -106,6 +122,7 @@
|
|||||||
return result;
|
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 = {};
|
||||||
|
|||||||
@ -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));
|
||||||
|
|||||||
1
scripts/floBlockchainAPI.min.js
vendored
Normal file
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
1
scripts/floTokenAPI.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user