Error handling for unavailable transactions
This commit is contained in:
parent
32f2b61ba6
commit
21a8ac7f59
293
css/main.css
293
css/main.css
@ -6,11 +6,11 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-family: 'Roboto', sans-serif;
|
font-family: "Roboto", sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
--primary-color: #1565C0;
|
--primary-color: #1565c0;
|
||||||
--text: 17, 17, 17;
|
--text: 17, 17, 17;
|
||||||
--text-light: 100, 100, 100;
|
--text-light: 100, 100, 100;
|
||||||
--foreground: 255, 255, 255;
|
--foreground: 255, 255, 255;
|
||||||
@ -22,8 +22,8 @@ body {
|
|||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
body[data-theme='dark'] {
|
body[data-theme=dark] {
|
||||||
--primary-color: #2196F3;
|
--primary-color: #2196f3;
|
||||||
--text: 218, 218, 218;
|
--text: 218, 218, 218;
|
||||||
--text-light: 170, 170, 170;
|
--text-light: 170, 170, 170;
|
||||||
--foreground: 20, 20, 20;
|
--foreground: 20, 20, 20;
|
||||||
@ -43,10 +43,10 @@ input[type=text]::-ms-reveal {
|
|||||||
height: 0;
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="search"]::-webkit-search-decoration,
|
input[type=search]::-webkit-search-decoration,
|
||||||
input[type="search"]::-webkit-search-cancel-button,
|
input[type=search]::-webkit-search-cancel-button,
|
||||||
input[type="search"]::-webkit-search-results-button,
|
input[type=search]::-webkit-search-results-button,
|
||||||
input[type="search"]::-webkit-search-results-decoration {
|
input[type=search]::-webkit-search-results-decoration {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +75,6 @@ button {
|
|||||||
padding: 0.6rem 1rem;
|
padding: 0.6rem 1rem;
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
-ms-flex-item-align: center;
|
-ms-flex-item-align: center;
|
||||||
-ms-grid-row-align: center;
|
|
||||||
align-self: center;
|
align-self: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,13 +98,11 @@ h3 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.grid {
|
.grid {
|
||||||
display: -ms-grid;
|
|
||||||
display: grid;
|
display: grid;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid-2 {
|
.grid-2 {
|
||||||
-ms-grid-columns: auto auto;
|
grid-template-columns: auto auto;
|
||||||
grid-template-columns: auto auto;
|
|
||||||
gap: 1em;
|
gap: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +122,7 @@ h3 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.other-font {
|
.other-font {
|
||||||
font-family: 'Barlow', sans-serif;
|
font-family: "Barlow", sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uppercase {
|
.uppercase {
|
||||||
@ -141,11 +138,9 @@ h3 {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
.toggle input[type=checkbox] {
|
||||||
.toggle input[type='checkbox'] {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toggle .switch {
|
.toggle .switch {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: -webkit-inline-box;
|
display: -webkit-inline-box;
|
||||||
@ -162,7 +157,6 @@ h3 {
|
|||||||
border-radius: 0.5rem;
|
border-radius: 0.5rem;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toggle .circle {
|
.toggle .circle {
|
||||||
border-radius: 0.5rem;
|
border-radius: 0.5rem;
|
||||||
-webkit-transition: -webkit-transform 0.3s;
|
-webkit-transition: -webkit-transform 0.3s;
|
||||||
@ -176,16 +170,13 @@ h3 {
|
|||||||
height: 1.2rem;
|
height: 1.2rem;
|
||||||
width: 1.2rem;
|
width: 1.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toggle .circle:first-of-type {
|
.toggle .circle:first-of-type {
|
||||||
margin-bottom: 0.4rem;
|
margin-bottom: 0.4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toggle .circle line {
|
.toggle .circle line {
|
||||||
stroke: rgba(var(--text), 0.8);
|
stroke: rgba(var(--text), 0.8);
|
||||||
stroke-width: 6;
|
stroke-width: 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toggle input:checked ~ .switch .circle {
|
.toggle input:checked ~ .switch .circle {
|
||||||
-webkit-transform: translateY(-1.7rem);
|
-webkit-transform: translateY(-1.7rem);
|
||||||
transform: translateY(-1.7rem);
|
transform: translateY(-1.7rem);
|
||||||
@ -194,35 +185,27 @@ h3 {
|
|||||||
section {
|
section {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
section .dark-background {
|
section .dark-background {
|
||||||
display: -ms-grid;
|
|
||||||
display: grid;
|
display: grid;
|
||||||
-ms-grid-rows: auto 1fr;
|
grid-template-rows: auto 1fr;
|
||||||
grid-template-rows: auto 1fr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ul[type='circle'] {
|
ul[type=circle] {
|
||||||
padding: 1.5rem 2.5rem;
|
padding: 1.5rem 2.5rem;
|
||||||
list-style: circle;
|
list-style: circle;
|
||||||
}
|
}
|
||||||
|
ul[type=circle] li {
|
||||||
ul[type='circle'] li {
|
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
ul[type=circle] li:last-of-type {
|
||||||
ul[type='circle'] li:last-of-type {
|
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul .balance {
|
ul .balance {
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul .balance:last-of-type {
|
ul .balance:last-of-type {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
@ -231,7 +214,8 @@ ul .balance:last-of-type {
|
|||||||
padding: 1.5rem 0;
|
padding: 1.5rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.margin, .page {
|
.margin,
|
||||||
|
.page {
|
||||||
margin: 0 1.5rem;
|
margin: 0 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,24 +229,20 @@ ul .balance:last-of-type {
|
|||||||
background: rgba(var(--text), 0.06);
|
background: rgba(var(--text), 0.06);
|
||||||
margin: 1.5rem 0;
|
margin: 1.5rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card h4 {
|
.card h4 {
|
||||||
margin-bottom: 0.4rem;
|
margin-bottom: 0.4rem;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card h2 {
|
.card h2 {
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.transaction-container {
|
.transaction-container {
|
||||||
display: -ms-grid;
|
|
||||||
display: grid;
|
display: grid;
|
||||||
margin-top: 1.5rem;
|
margin-top: 1.5rem;
|
||||||
gap: 1.5rem;
|
gap: 1.5rem;
|
||||||
-ms-grid-columns: (minmax(20rem, 1fr))[auto-fit];
|
grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
|
||||||
grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
@ -274,11 +254,9 @@ ul .balance:last-of-type {
|
|||||||
margin-top: 1.5rem;
|
margin-top: 1.5rem;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label:first-of-type {
|
.label:first-of-type {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label + h4:not(.address) {
|
.label + h4:not(.address) {
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
@ -301,11 +279,9 @@ ul .balance:last-of-type {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#logo h4 {
|
#logo h4 {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
#logo #main_logo {
|
#logo #main_logo {
|
||||||
height: 1.2rem;
|
height: 1.2rem;
|
||||||
width: 1.2rem;
|
width: 1.2rem;
|
||||||
@ -318,10 +294,8 @@ ul .balance:last-of-type {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#first_section {
|
#first_section {
|
||||||
display: -ms-grid;
|
|
||||||
display: grid;
|
display: grid;
|
||||||
-ms-grid-rows: 1fr auto;
|
grid-template-rows: 1fr auto;
|
||||||
grid-template-rows: 1fr auto;
|
|
||||||
min-height: calc(100vh - 8rem);
|
min-height: calc(100vh - 8rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -340,7 +314,6 @@ header.grid-2 {
|
|||||||
background: rgba(var(--foreground), 1);
|
background: rgba(var(--foreground), 1);
|
||||||
padding: 1.5rem 8vw;
|
padding: 1.5rem 8vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search_page header {
|
#search_page header {
|
||||||
-webkit-box-align: center;
|
-webkit-box-align: center;
|
||||||
-ms-flex-align: center;
|
-ms-flex-align: center;
|
||||||
@ -350,7 +323,6 @@ header.grid-2 {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search_page header .icon {
|
#search_page header .icon {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -358,24 +330,20 @@ header.grid-2 {
|
|||||||
width: 2.2rem;
|
width: 2.2rem;
|
||||||
padding: 0.6rem;
|
padding: 0.6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search_page h1 {
|
#search_page h1 {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 3rem;
|
font-size: 3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search_page .input {
|
#search_page .input {
|
||||||
-webkit-animation: fade 0.4s;
|
-webkit-animation: fade 0.4s;
|
||||||
animation: fade 0.4s;
|
animation: fade 0.4s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search_page .input input:valid ~ #suggestions {
|
#search_page .input input:valid ~ #suggestions {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
-webkit-transform: none;
|
-webkit-transform: none;
|
||||||
transform: none;
|
transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search_page #suggestions {
|
#search_page #suggestions {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
@ -395,17 +363,14 @@ header.grid-2 {
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
margin-top: 0.5rem;
|
margin-top: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search_page #suggestions:empty {
|
#search_page #suggestions:empty {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search_page .suggestion {
|
#search_page .suggestion {
|
||||||
padding: 0.6rem 1.5rem 0.6rem 3rem;
|
padding: 0.6rem 1.5rem 0.6rem 3rem;
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search_page .suggestion:hover, #search_page .suggestion:focus {
|
#search_page .suggestion:hover, #search_page .suggestion:focus {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
@ -420,7 +385,6 @@ header.grid-2 {
|
|||||||
-ms-flex-direction: column;
|
-ms-flex-direction: column;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
#main_search h2 {
|
#main_search h2 {
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
-ms-flex-item-align: start;
|
-ms-flex-item-align: start;
|
||||||
@ -429,14 +393,12 @@ header.grid-2 {
|
|||||||
letter-spacing: 0.1em;
|
letter-spacing: 0.1em;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
#main_search h4 {
|
#main_search h4 {
|
||||||
line-height: 1.4em;
|
line-height: 1.4em;
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: rgba(var(--text-light), 1);
|
color: rgba(var(--text-light), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#main_search label {
|
#main_search label {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
@ -444,10 +406,8 @@ header.grid-2 {
|
|||||||
.input {
|
.input {
|
||||||
border-radius: 0.2rem;
|
border-radius: 0.2rem;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: -ms-grid;
|
|
||||||
display: grid;
|
display: grid;
|
||||||
-ms-grid-columns: auto 1fr;
|
grid-template-columns: auto 1fr;
|
||||||
grid-template-columns: auto 1fr;
|
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 1.5rem 0;
|
margin: 1.5rem 0;
|
||||||
@ -458,7 +418,6 @@ header.grid-2 {
|
|||||||
gap: 1em;
|
gap: 1em;
|
||||||
background: var(--background);
|
background: var(--background);
|
||||||
}
|
}
|
||||||
|
|
||||||
.input input {
|
.input input {
|
||||||
border: none;
|
border: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -480,16 +439,13 @@ header.grid-2 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.copy-row {
|
.copy-row {
|
||||||
display: -ms-grid;
|
|
||||||
display: grid;
|
display: grid;
|
||||||
-ms-grid-columns: 1fr auto;
|
grid-template-columns: 1fr auto;
|
||||||
grid-template-columns: 1fr auto;
|
|
||||||
-webkit-box-align: center;
|
-webkit-box-align: center;
|
||||||
-ms-flex-align: center;
|
-ms-flex-align: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.copy-row .icon {
|
.copy-row .icon {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
@ -536,7 +492,6 @@ header.grid-2 {
|
|||||||
transform: none;
|
transform: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@-webkit-keyframes flyInRight {
|
@-webkit-keyframes flyInRight {
|
||||||
from {
|
from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@ -549,7 +504,6 @@ header.grid-2 {
|
|||||||
transform: none;
|
transform: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes flyInRight {
|
@keyframes flyInRight {
|
||||||
from {
|
from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@ -562,7 +516,6 @@ header.grid-2 {
|
|||||||
transform: none;
|
transform: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@-webkit-keyframes flyOutLeft {
|
@-webkit-keyframes flyOutLeft {
|
||||||
from {
|
from {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
@ -575,7 +528,6 @@ header.grid-2 {
|
|||||||
transform: translateX(-0.5rem);
|
transform: translateX(-0.5rem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes flyOutLeft {
|
@keyframes flyOutLeft {
|
||||||
from {
|
from {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
@ -588,7 +540,6 @@ header.grid-2 {
|
|||||||
transform: translateX(-0.5rem);
|
transform: translateX(-0.5rem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@-webkit-keyframes flyOutRight {
|
@-webkit-keyframes flyOutRight {
|
||||||
from {
|
from {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
@ -601,7 +552,6 @@ header.grid-2 {
|
|||||||
transform: translateX(0.5rem);
|
transform: translateX(0.5rem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes flyOutRight {
|
@keyframes flyOutRight {
|
||||||
from {
|
from {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
@ -614,7 +564,6 @@ header.grid-2 {
|
|||||||
transform: translateX(0.5rem);
|
transform: translateX(0.5rem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.fly-in-from-left {
|
.fly-in-from-left {
|
||||||
-webkit-animation: flyInLeft 0.2s forwards;
|
-webkit-animation: flyInLeft 0.2s forwards;
|
||||||
animation: flyInLeft 0.2s forwards;
|
animation: flyInLeft 0.2s forwards;
|
||||||
@ -637,14 +586,11 @@ header.grid-2 {
|
|||||||
|
|
||||||
#highlights {
|
#highlights {
|
||||||
padding: 1.5rem 0;
|
padding: 1.5rem 0;
|
||||||
display: -ms-grid;
|
|
||||||
display: grid;
|
display: grid;
|
||||||
-ms-grid-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-areas: "token token" "total wallet" "contract contract";
|
||||||
grid-template-areas: 'token token' 'total wallet' 'contract contract';
|
|
||||||
gap: 1.5rem;
|
gap: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#highlights .highlight-item {
|
#highlights .highlight-item {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
@ -657,11 +603,9 @@ header.grid-2 {
|
|||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
border-left: 0.1rem solid rgba(var(--text), 0.2);
|
border-left: 0.1rem solid rgba(var(--text), 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
#highlights .highlight-item .label {
|
#highlights .highlight-item .label {
|
||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#highlights .highlight-item h1 {
|
#highlights .highlight-item h1 {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
letter-spacing: 0.1rem;
|
letter-spacing: 0.1rem;
|
||||||
@ -669,44 +613,28 @@ header.grid-2 {
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
#highlights .highlight-item:first-of-type {
|
#highlights .highlight-item:first-of-type {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
#highlights .highlight-item:nth-of-type(2) {
|
#highlights .highlight-item:nth-of-type(2) {
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
|
|
||||||
#highlights .highlight-item:first-of-type {
|
#highlights .highlight-item:first-of-type {
|
||||||
-ms-grid-row: 1;
|
|
||||||
-ms-grid-column: 1;
|
|
||||||
-ms-grid-column-span: 2;
|
|
||||||
grid-area: token;
|
grid-area: token;
|
||||||
-webkit-animation: flyInLeft 0.4s 0.2s forwards;
|
-webkit-animation: flyInLeft 0.4s 0.2s forwards;
|
||||||
animation: flyInLeft 0.4s 0.2s forwards;
|
animation: flyInLeft 0.4s 0.2s forwards;
|
||||||
}
|
}
|
||||||
|
|
||||||
#highlights .highlight-item:nth-of-type(2) {
|
#highlights .highlight-item:nth-of-type(2) {
|
||||||
-ms-grid-row: 2;
|
|
||||||
-ms-grid-column: 1;
|
|
||||||
grid-area: total;
|
grid-area: total;
|
||||||
-webkit-animation: flyInLeft 0.4s 0.4s forwards;
|
-webkit-animation: flyInLeft 0.4s 0.4s forwards;
|
||||||
animation: flyInLeft 0.4s 0.4s forwards;
|
animation: flyInLeft 0.4s 0.4s forwards;
|
||||||
}
|
}
|
||||||
|
|
||||||
#highlights .highlight-item:nth-of-type(3) {
|
#highlights .highlight-item:nth-of-type(3) {
|
||||||
-ms-grid-row: 2;
|
|
||||||
-ms-grid-column: 2;
|
|
||||||
grid-area: wallet;
|
grid-area: wallet;
|
||||||
-webkit-animation: flyInLeft 0.4s 0.6s forwards;
|
-webkit-animation: flyInLeft 0.4s 0.6s forwards;
|
||||||
animation: flyInLeft 0.4s 0.6s forwards;
|
animation: flyInLeft 0.4s 0.6s forwards;
|
||||||
}
|
}
|
||||||
|
|
||||||
#highlights .highlight-item:last-of-type {
|
#highlights .highlight-item:last-of-type {
|
||||||
-ms-grid-row: 3;
|
|
||||||
-ms-grid-column: 1;
|
|
||||||
-ms-grid-column-span: 2;
|
|
||||||
grid-area: contract;
|
grid-area: contract;
|
||||||
-webkit-animation: flyInLeft 0.4s 0.8s forwards;
|
-webkit-animation: flyInLeft 0.4s 0.8s forwards;
|
||||||
animation: flyInLeft 0.4s 0.8s forwards;
|
animation: flyInLeft 0.4s 0.8s forwards;
|
||||||
@ -716,11 +644,9 @@ header.grid-2 {
|
|||||||
#latest_blocks_section {
|
#latest_blocks_section {
|
||||||
background: rgba(var(--foreground), 1);
|
background: rgba(var(--foreground), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#latest_transaction_section header,
|
#latest_transaction_section header,
|
||||||
#latest_blocks_section header {
|
#latest_blocks_section header {
|
||||||
-ms-grid-columns: 1fr auto;
|
grid-template-columns: 1fr auto;
|
||||||
grid-template-columns: 1fr auto;
|
|
||||||
background: inherit;
|
background: inherit;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
@ -728,7 +654,6 @@ header.grid-2 {
|
|||||||
#main_header {
|
#main_header {
|
||||||
height: 8rem;
|
height: 8rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#main_header > .flex:first-of-type {
|
#main_header > .flex:first-of-type {
|
||||||
margin-top: 1.5rem;
|
margin-top: 1.5rem;
|
||||||
}
|
}
|
||||||
@ -739,27 +664,22 @@ header.grid-2 {
|
|||||||
-ms-flex-align: center;
|
-ms-flex-align: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#page_header h3 {
|
#page_header h3 {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
|
|
||||||
#page_header .icon {
|
#page_header .icon {
|
||||||
height: 1.8rem;
|
height: 1.8rem;
|
||||||
width: 1.8rem;
|
width: 1.8rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#page_header .icon:first-of-type {
|
#page_header .icon:first-of-type {
|
||||||
margin-right: 1rem;
|
margin-right: 1rem;
|
||||||
padding: 0.4rem 0.4rem 0.4rem 0;
|
padding: 0.4rem 0.4rem 0.4rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#page_header .icon:nth-of-type(2) {
|
#page_header .icon:nth-of-type(2) {
|
||||||
padding: 0.4rem 0 0.4rem 0.4rem;
|
padding: 0.4rem 0 0.4rem 0.4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#page_header #secondary_search_btn {
|
#page_header #secondary_search_btn {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
@ -767,12 +687,10 @@ header.grid-2 {
|
|||||||
.page {
|
.page {
|
||||||
padding: 0 0 1rem 0;
|
padding: 0 0 1rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page h3.heading {
|
.page h3.heading {
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page > h3.heading {
|
.page > h3.heading {
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
}
|
}
|
||||||
@ -784,11 +702,9 @@ p {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.balance-card {
|
.balance-card {
|
||||||
display: -ms-inline-grid;
|
|
||||||
display: inline-grid;
|
display: inline-grid;
|
||||||
-ms-grid-columns: auto auto;
|
grid-template-columns: auto auto;
|
||||||
grid-template-columns: auto auto;
|
grid-template-areas: "labl logo" "balance logo" "address address";
|
||||||
grid-template-areas: 'labl logo' 'balance logo' 'address address';
|
|
||||||
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' style='fill:none; stroke: %23ffffff08'%3E%3Ccircle cx='3.5' cy='3.5' r='2.12'/%3E%3Ccircle cx='5' cy='10' r='1'/%3E%3Ccircle cx='8.5' cy='4.5' r='1.5'/%3E%3Ccircle cx='6' cy='33' r='2'/%3E%3Ccircle cx='14' cy='29' r='1'/%3E%3Ccircle cx='9.5' cy='22.5' r='1.5'/%3E%3Ccircle cx='29.5' cy='17.5' r='4.5'/%3E%3Ccircle cx='22' cy='8' r='1'/%3E%3Ccircle cx='15.5' cy='12.5' r='2.5'/%3E%3Ccircle cx='27.5' cy='30.5' r='0.5'/%3E%3Ccircle cx='18.5' cy='35.5' r='2.5'/%3E%3Ccircle cx='32' cy='36' r='1'/%3E%3Ccircle cx='35' cy='25' r='1'/%3E%3Ccircle cx='23' cy='21' r='2'/%3E%3Ccircle cx='36.5' cy='1.5' r='0.5'/%3E%3Ccircle cx='30.5' cy='3.5' r='1.5'/%3E%3Ccircle cx='34.5' cy='6.5' r='1.5'/%3E%3C/svg%3E"), linear-gradient(135deg, #4d20a7, #21106e);
|
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' style='fill:none; stroke: %23ffffff08'%3E%3Ccircle cx='3.5' cy='3.5' r='2.12'/%3E%3Ccircle cx='5' cy='10' r='1'/%3E%3Ccircle cx='8.5' cy='4.5' r='1.5'/%3E%3Ccircle cx='6' cy='33' r='2'/%3E%3Ccircle cx='14' cy='29' r='1'/%3E%3Ccircle cx='9.5' cy='22.5' r='1.5'/%3E%3Ccircle cx='29.5' cy='17.5' r='4.5'/%3E%3Ccircle cx='22' cy='8' r='1'/%3E%3Ccircle cx='15.5' cy='12.5' r='2.5'/%3E%3Ccircle cx='27.5' cy='30.5' r='0.5'/%3E%3Ccircle cx='18.5' cy='35.5' r='2.5'/%3E%3Ccircle cx='32' cy='36' r='1'/%3E%3Ccircle cx='35' cy='25' r='1'/%3E%3Ccircle cx='23' cy='21' r='2'/%3E%3Ccircle cx='36.5' cy='1.5' r='0.5'/%3E%3Ccircle cx='30.5' cy='3.5' r='1.5'/%3E%3Ccircle cx='34.5' cy='6.5' r='1.5'/%3E%3C/svg%3E"), linear-gradient(135deg, #4d20a7, #21106e);
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
color: white;
|
color: white;
|
||||||
@ -796,11 +712,7 @@ p {
|
|||||||
padding: 2rem 1.5rem;
|
padding: 2rem 1.5rem;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.balance-card .flo-logo {
|
.balance-card .flo-logo {
|
||||||
-ms-grid-row: 1;
|
|
||||||
-ms-grid-row-span: 2;
|
|
||||||
-ms-grid-column: 2;
|
|
||||||
grid-area: logo;
|
grid-area: logo;
|
||||||
fill: white;
|
fill: white;
|
||||||
height: 1.5rem;
|
height: 1.5rem;
|
||||||
@ -808,44 +720,34 @@ p {
|
|||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
justify-self: flex-end;
|
justify-self: flex-end;
|
||||||
}
|
}
|
||||||
|
.balance-card h3,
|
||||||
.balance-card h3, .balance-card h4 {
|
.balance-card h4 {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.balance-card h3 {
|
.balance-card h3 {
|
||||||
-ms-grid-row: 2;
|
|
||||||
-ms-grid-column: 1;
|
|
||||||
grid-area: balance;
|
grid-area: balance;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.balance-card h4 {
|
.balance-card h4 {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
.balance-card p {
|
.balance-card p {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
-ms-grid-row: 3;
|
|
||||||
-ms-grid-column: 1;
|
|
||||||
-ms-grid-column-span: 2;
|
|
||||||
grid-area: address;
|
grid-area: address;
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
letter-spacing: 0.1em;
|
letter-spacing: 0.1em;
|
||||||
margin-top: 3rem;
|
margin-top: 3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.balance-card .label {
|
.balance-card .label {
|
||||||
-ms-grid-row: 1;
|
|
||||||
-ms-grid-column: 1;
|
|
||||||
grid-area: labl;
|
grid-area: labl;
|
||||||
color: white;
|
color: white;
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice, .status {
|
.choice,
|
||||||
|
.status {
|
||||||
padding: 0.5rem 0.8rem;
|
padding: 0.5rem 0.8rem;
|
||||||
border-radius: 2rem;
|
border-radius: 2rem;
|
||||||
display: -webkit-inline-box;
|
display: -webkit-inline-box;
|
||||||
@ -869,7 +771,6 @@ p {
|
|||||||
.choice {
|
.choice {
|
||||||
border: solid 1px rgba(var(--text), 0.2);
|
border: solid 1px rgba(var(--text), 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice:last-of-type {
|
.choice:last-of-type {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
@ -877,13 +778,16 @@ p {
|
|||||||
.status {
|
.status {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status.closed {
|
.status.closed {
|
||||||
background: rgba(var(--foreground), 1);
|
background: rgba(var(--foreground), 1);
|
||||||
border: solid 1px rgba(var(--text), 0.2);
|
border: solid 1px rgba(var(--text), 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.address, .token, .hash, .contract, .block-height {
|
.address,
|
||||||
|
.token,
|
||||||
|
.hash,
|
||||||
|
.contract,
|
||||||
|
.block-height {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
}
|
}
|
||||||
@ -894,7 +798,6 @@ p {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tabs {
|
.tabs {
|
||||||
position: -webkit-sticky;
|
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
padding: 1rem 0 1rem 0;
|
padding: 1rem 0 1rem 0;
|
||||||
@ -905,7 +808,6 @@ p {
|
|||||||
display: flex;
|
display: flex;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabs .tab {
|
.tabs .tab {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
@ -914,15 +816,12 @@ p {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabs .tab:last-of-type {
|
.tabs .tab:last-of-type {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabs .tab.active {
|
.tabs .tab.active {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabs .line {
|
.tabs .line {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 0.12rem;
|
height: 0.12rem;
|
||||||
@ -936,12 +835,10 @@ p {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.contract-choice {
|
.contract-choice {
|
||||||
display: -ms-grid;
|
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 0.5rem 1rem;
|
gap: 0.5rem 1rem;
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contract-choice:last-of-type {
|
.contract-choice:last-of-type {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
@ -971,40 +868,29 @@ p {
|
|||||||
transform: none;
|
transform: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.transaction {
|
.transaction {
|
||||||
display: -ms-grid;
|
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 2rem 1rem;
|
gap: 2rem 1rem;
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
border-radius: 0.5rem;
|
border-radius: 0.5rem;
|
||||||
-ms-grid-columns: min-content 1fr;
|
grid-template-columns: -webkit-min-content 1fr;
|
||||||
grid-template-columns: -webkit-min-content 1fr;
|
grid-template-columns: min-content 1fr;
|
||||||
grid-template-columns: min-content 1fr;
|
grid-template-rows: auto 1fr;
|
||||||
-ms-grid-rows: auto 1fr;
|
|
||||||
grid-template-rows: auto 1fr;
|
|
||||||
background: rgba(var(--text), 0.06);
|
background: rgba(var(--text), 0.06);
|
||||||
grid-template-areas: '. .' 'info info';
|
grid-template-areas: ". ." "info info";
|
||||||
}
|
}
|
||||||
|
|
||||||
.transaction .contract-info {
|
.transaction .contract-info {
|
||||||
-ms-grid-row: 2;
|
|
||||||
-ms-grid-column: 1;
|
|
||||||
-ms-grid-column-span: 2;
|
|
||||||
grid-area: info;
|
grid-area: info;
|
||||||
-webkit-box-align: start;
|
-webkit-box-align: start;
|
||||||
-ms-flex-align: start;
|
-ms-flex-align: start;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.transaction h4 {
|
.transaction h4 {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.transaction > .icon:first-of-type {
|
.transaction > .icon:first-of-type {
|
||||||
stroke-width: 4;
|
stroke-width: 4;
|
||||||
-ms-grid-column-align: center;
|
justify-self: center;
|
||||||
justify-self: center;
|
|
||||||
height: 3rem;
|
height: 3rem;
|
||||||
width: 3rem;
|
width: 3rem;
|
||||||
padding: 0.8rem;
|
padding: 0.8rem;
|
||||||
@ -1013,7 +899,6 @@ p {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#loader_page {
|
#loader_page {
|
||||||
display: -ms-grid;
|
|
||||||
display: grid;
|
display: grid;
|
||||||
place-content: center;
|
place-content: center;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
@ -1023,15 +908,13 @@ p {
|
|||||||
z-index: 10;
|
z-index: 10;
|
||||||
background: rgba(var(--foreground), 1);
|
background: rgba(var(--foreground), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#loader_page h4 {
|
#loader_page h4 {
|
||||||
margin-top: 1.5rem;
|
margin-top: 1.5rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
#loader {
|
#loader {
|
||||||
-ms-grid-column-align: center;
|
justify-self: center;
|
||||||
justify-self: center;
|
|
||||||
height: 2.5rem;
|
height: 2.5rem;
|
||||||
width: 2.5rem;
|
width: 2.5rem;
|
||||||
-webkit-transform-origin: center;
|
-webkit-transform-origin: center;
|
||||||
@ -1064,17 +947,17 @@ p {
|
|||||||
transform: rotate(360deg);
|
transform: rotate(360deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#all_blocks_page,
|
||||||
#all_blocks_page, #top_blocks_container, #token_balance_container {
|
#top_blocks_container,
|
||||||
display: -ms-grid;
|
#token_balance_container {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
-ms-grid-columns: (minmax(12rem, 1fr))[auto-fill];
|
grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
|
||||||
grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
|
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
}
|
}
|
||||||
|
#all_blocks_page .card,
|
||||||
#all_blocks_page .card, #top_blocks_container .card, #token_balance_container .card {
|
#top_blocks_container .card,
|
||||||
|
#token_balance_container .card {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1082,148 +965,143 @@ p {
|
|||||||
margin-top: 1.5rem;
|
margin-top: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#error_page {
|
||||||
|
padding: 1.5rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 640px) {
|
@media only screen and (min-width: 640px) {
|
||||||
.margin, .page {
|
.margin,
|
||||||
|
.page {
|
||||||
margin: 0 4vw;
|
margin: 0 4vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
width: 60% !important;
|
width: 60% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
section header h1 {
|
section header h1 {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#main_search h1 {
|
#main_search h1 {
|
||||||
font-size: 6rem;
|
font-size: 6rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#highlights {
|
#highlights {
|
||||||
gap: 2rem;
|
gap: 2rem;
|
||||||
-ms-grid-columns: (auto)[2];
|
grid-template-columns: repeat(2, auto);
|
||||||
grid-template-columns: repeat(2, auto);
|
grid-template-areas: "token total" " wallet contract";
|
||||||
grid-template-areas: 'token total' ' wallet contract';
|
|
||||||
}
|
}
|
||||||
#highlights .highlight-item h1 {
|
#highlights .highlight-item h1 {
|
||||||
font-size: 2.5rem;
|
font-size: 2.5rem;
|
||||||
}
|
}
|
||||||
#highlights .highlight-item:first-of-type {
|
#highlights .highlight-item:first-of-type {
|
||||||
-ms-grid-row: 1;
|
|
||||||
-ms-grid-column: 1;
|
|
||||||
grid-area: token;
|
grid-area: token;
|
||||||
}
|
}
|
||||||
#highlights .highlight-item:nth-of-type(2) {
|
#highlights .highlight-item:nth-of-type(2) {
|
||||||
-ms-grid-row: 1;
|
|
||||||
-ms-grid-column: 2;
|
|
||||||
grid-area: total;
|
grid-area: total;
|
||||||
}
|
}
|
||||||
#highlights .highlight-item:nth-of-type(3) {
|
#highlights .highlight-item:nth-of-type(3) {
|
||||||
-ms-grid-row: 2;
|
|
||||||
-ms-grid-column: 1;
|
|
||||||
grid-area: wallet;
|
grid-area: wallet;
|
||||||
}
|
}
|
||||||
#highlights .highlight-item:last-of-type {
|
#highlights .highlight-item:last-of-type {
|
||||||
-ms-grid-row: 2;
|
|
||||||
-ms-grid-column: 2;
|
|
||||||
grid-area: contract;
|
grid-area: contract;
|
||||||
}
|
}
|
||||||
|
|
||||||
#page_header {
|
#page_header {
|
||||||
padding: 1.5rem 0;
|
padding: 1.5rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#transaction_page {
|
#transaction_page {
|
||||||
display: -ms-grid;
|
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 0 1.5rem;
|
gap: 0 1.5rem;
|
||||||
-ms-grid-columns: 40% 60%;
|
grid-template-columns: 40% 60%;
|
||||||
grid-template-columns: 40% 60%;
|
grid-template-areas: "header header" ". .";
|
||||||
grid-template-areas: 'header header' '. .';
|
|
||||||
}
|
}
|
||||||
#transaction_page .head {
|
#transaction_page .head {
|
||||||
-ms-grid-row: 1;
|
|
||||||
-ms-grid-column: 1;
|
|
||||||
-ms-grid-column-span: 2;
|
|
||||||
grid-area: header;
|
grid-area: header;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contract-choice {
|
.contract-choice {
|
||||||
-ms-grid-columns: 2fr 1fr 1fr;
|
grid-template-columns: 2fr 1fr 1fr;
|
||||||
grid-template-columns: 2fr 1fr 1fr;
|
|
||||||
-webkit-box-align: center;
|
-webkit-box-align: center;
|
||||||
-ms-flex-align: center;
|
-ms-flex-align: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 1280px) {
|
@media only screen and (min-width: 1280px) {
|
||||||
.margin, .page {
|
.margin,
|
||||||
|
.page {
|
||||||
margin: 0 12vw;
|
margin: 0 12vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
width: 50% !important;
|
width: 50% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#highlights {
|
#highlights {
|
||||||
-ms-grid-columns: (auto)[4];
|
grid-template-columns: repeat(4, auto);
|
||||||
grid-template-columns: repeat(4, auto);
|
grid-template-areas: "token total wallet contract";
|
||||||
grid-template-areas: 'token total wallet contract';
|
|
||||||
}
|
}
|
||||||
#highlights .highlight-item:first-of-type {
|
#highlights .highlight-item:first-of-type {
|
||||||
-ms-grid-row: 1;
|
|
||||||
-ms-grid-column: 1;
|
|
||||||
grid-area: token;
|
grid-area: token;
|
||||||
}
|
}
|
||||||
#highlights .highlight-item:nth-of-type(2) {
|
#highlights .highlight-item:nth-of-type(2) {
|
||||||
-ms-grid-row: 1;
|
|
||||||
-ms-grid-column: 2;
|
|
||||||
grid-area: total;
|
grid-area: total;
|
||||||
}
|
}
|
||||||
#highlights .highlight-item:nth-of-type(3) {
|
#highlights .highlight-item:nth-of-type(3) {
|
||||||
-ms-grid-row: 1;
|
|
||||||
-ms-grid-column: 3;
|
|
||||||
grid-area: wallet;
|
grid-area: wallet;
|
||||||
}
|
}
|
||||||
#highlights .highlight-item:last-of-type {
|
#highlights .highlight-item:last-of-type {
|
||||||
-ms-grid-row: 1;
|
|
||||||
-ms-grid-column: 4;
|
|
||||||
grid-area: contract;
|
grid-area: contract;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 1920px) {
|
@media only screen and (min-width: 1920px) {
|
||||||
body {
|
body {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
.margin, .page {
|
|
||||||
|
.margin,
|
||||||
|
.page {
|
||||||
margin: 0 16vw;
|
margin: 0 16vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search_page {
|
#search_page {
|
||||||
padding: 1.5rem 12vw;
|
padding: 1.5rem 12vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
width: 40% !important;
|
width: 40% !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 2048px) {
|
@media only screen and (min-width: 2048px) {
|
||||||
body {
|
body {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
.margin, .page {
|
|
||||||
|
.margin,
|
||||||
|
.page {
|
||||||
margin: 0 26vw;
|
margin: 0 26vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search_page {
|
#search_page {
|
||||||
padding: 1.5rem 24vw;
|
padding: 1.5rem 24vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
#first_section {
|
#first_section {
|
||||||
min-height: auto;
|
min-height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
width: 30% !important;
|
width: 30% !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 320px) {
|
@media only screen and (max-width: 320px) {
|
||||||
body {
|
body {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (hover: hover) {
|
@media (hover: hover) {
|
||||||
button {
|
button {
|
||||||
-webkit-transition: background-color 0.3s;
|
-webkit-transition: background-color 0.3s;
|
||||||
@ -1233,9 +1111,11 @@ p {
|
|||||||
background: var(--primary-color);
|
background: var(--primary-color);
|
||||||
color: rgba(var(--foreground), 1);
|
color: rgba(var(--foreground), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.hover {
|
.hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab {
|
.tab {
|
||||||
-webkit-transition: opacity 0.3s;
|
-webkit-transition: opacity 0.3s;
|
||||||
transition: opacity 0.3s;
|
transition: opacity 0.3s;
|
||||||
@ -1243,5 +1123,4 @@ p {
|
|||||||
.tab:hover {
|
.tab:hover {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*# sourceMappingURL=main.css.map */
|
|
||||||
File diff suppressed because one or more lines are too long
1
css/main.min.css
vendored
Normal file
1
css/main.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1653
css/main.scss
1653
css/main.scss
File diff suppressed because it is too large
Load Diff
404
index.html
404
index.html
@ -5,7 +5,7 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>FLO Scout</title>
|
<title>FLO Scout</title>
|
||||||
<link rel="stylesheet" href="css/main.css" />
|
<link rel="stylesheet" href="css/main.min.css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body data-theme="light">
|
<body data-theme="light">
|
||||||
@ -259,7 +259,7 @@
|
|||||||
page.classList.add("page");
|
page.classList.add("page");
|
||||||
page.id = "transaction_page";
|
page.id = "transaction_page";
|
||||||
// todo : This is a temporary fix. Fix this on the Database and API level
|
// todo : This is a temporary fix. Fix this on the Database and API level
|
||||||
if(type =='smartContractPays' || type ==' smartContractPays'){
|
if (type == 'smartContractPays' || type == ' smartContractPays') {
|
||||||
name = ''
|
name = ''
|
||||||
}
|
}
|
||||||
page.innerHTML = `
|
page.innerHTML = `
|
||||||
@ -315,6 +315,16 @@
|
|||||||
page.id = "all_blocks_page";
|
page.id = "all_blocks_page";
|
||||||
return page;
|
return page;
|
||||||
},
|
},
|
||||||
|
errorPage(reason) {
|
||||||
|
const page = document.createElement('section')
|
||||||
|
page.classList.add('page')
|
||||||
|
page.id = 'error_page'
|
||||||
|
page.innerHTML = `
|
||||||
|
<h1>Not found!</h1>
|
||||||
|
<p>${reason}</p>
|
||||||
|
`
|
||||||
|
return page
|
||||||
|
},
|
||||||
addrBalanceCard(address, balance, token) {
|
addrBalanceCard(address, balance, token) {
|
||||||
let card = document.createElement('li')
|
let card = document.createElement('li')
|
||||||
card.classList.add('balance')
|
card.classList.add('balance')
|
||||||
@ -558,7 +568,7 @@
|
|||||||
winningChoice,
|
winningChoice,
|
||||||
committeeAddress
|
committeeAddress
|
||||||
} = obj,
|
} = obj,
|
||||||
card = document.createElement("div");
|
card = document.createElement("div");
|
||||||
card.classList.add("transaction", "contract-trigger");
|
card.classList.add("transaction", "contract-trigger");
|
||||||
card.id = hash;
|
card.id = hash;
|
||||||
card.innerHTML = ` <svg class="icon" viewBox="0 0 64 64">
|
card.innerHTML = ` <svg class="icon" viewBox="0 0 64 64">
|
||||||
@ -666,12 +676,12 @@
|
|||||||
return str.replace(/ /g, "-");
|
return str.replace(/ /g, "-");
|
||||||
}
|
}
|
||||||
|
|
||||||
function showPage(page){
|
function showPage(page) {
|
||||||
document.getElementById(page).classList.remove('hide')
|
document.getElementById(page).classList.remove('hide')
|
||||||
document.getElementById('page_container').classList.add('hide-completely')
|
document.getElementById('page_container').classList.add('hide-completely')
|
||||||
document.getElementById('main_search_field').focus();
|
document.getElementById('main_search_field').focus();
|
||||||
}
|
}
|
||||||
function hidePage(page){
|
function hidePage(page) {
|
||||||
document.getElementById(page).classList.add('hide')
|
document.getElementById(page).classList.add('hide')
|
||||||
document.getElementById('page_container').classList.remove('hide-completely')
|
document.getElementById('page_container').classList.remove('hide-completely')
|
||||||
}
|
}
|
||||||
@ -720,126 +730,139 @@
|
|||||||
loading(true)
|
loading(true)
|
||||||
removePage();
|
removePage();
|
||||||
|
|
||||||
if (pageId === "address_page") {
|
switch (pageId) {
|
||||||
let [addressInfo, addressBalance, addressTxs] = await Promise.all([getAddressInfo(field), getAddressBalance(field), getAddressTxs(field)])
|
case "address_page":
|
||||||
console.log(addressInfo)
|
let [addressInfo, addressBalance, addressTxs] = await Promise.all([getAddressInfo(field), getAddressBalance(field), getAddressTxs(field)])
|
||||||
pageContainer.append(create.addressPage({
|
console.log(addressInfo)
|
||||||
balance: addressBalance,
|
pageContainer.append(create.addressPage({
|
||||||
address: field
|
balance: addressBalance,
|
||||||
}))
|
address: field
|
||||||
pageTitle.textContent = 'Address'
|
}))
|
||||||
loading()
|
pageTitle.textContent = 'Address'
|
||||||
appendTransactions('address_transaction_container', addressTxs)
|
loading()
|
||||||
for (token in addressInfo) {
|
appendTransactions('address_transaction_container', addressTxs)
|
||||||
frag.append(create.tokenBalanceCard(token, addressInfo[token].balance))
|
for (token in addressInfo) {
|
||||||
}
|
frag.append(create.tokenBalanceCard(token, addressInfo[token].balance))
|
||||||
document.getElementById('token_balance_container').append(frag)
|
}
|
||||||
|
document.getElementById('token_balance_container').append(frag)
|
||||||
|
|
||||||
|
break
|
||||||
|
|
||||||
|
case "token_page":
|
||||||
|
let [tokenInfo, tokenBalances, tokenTransactions] = await Promise.all([getTokenInfo(field), getTokenBalances(field), getTokenTransactions(field)])
|
||||||
|
for (bal in tokenBalances) {
|
||||||
|
frag.append(create.addrBalanceCard(bal, tokenBalances[bal], tokenInfo.token))
|
||||||
|
}
|
||||||
|
pageContainer.append(create.tokenPage(tokenInfo));
|
||||||
|
pageTitle.textContent = "Token";
|
||||||
|
document.getElementById('token_balance_container').append(frag)
|
||||||
|
loading()
|
||||||
|
appendTransactions('token_transaction_container', tokenTransactions)
|
||||||
|
break
|
||||||
|
|
||||||
|
case "contract_page":
|
||||||
|
// todo: load contract variable dynamically
|
||||||
|
let contract = {
|
||||||
|
name: field.name,
|
||||||
|
address: field.address,
|
||||||
|
};
|
||||||
|
|
||||||
|
let [contractInfo, contractTransactions, contractParticipants] = await Promise.all([getContractInfo(contract), getContractTransactions(contract), getContractParticipants(contract)])
|
||||||
|
// todo : check the type of contract & then further checks like fetching details of contractParticipant
|
||||||
|
pageContainer.append(create.contractPage(contractInfo));
|
||||||
|
pageTitle.textContent = "Contract";
|
||||||
|
loading()
|
||||||
|
console.log(contractParticipants)
|
||||||
|
let winners = []
|
||||||
|
for (participant in contractParticipants) {
|
||||||
|
if (contractParticipants[participant].winningAmount)
|
||||||
|
winners.push(contractParticipants[participant])
|
||||||
|
}
|
||||||
|
// append latest transactions
|
||||||
|
appendTransactions('contract_transaction_container', contractTransactions)
|
||||||
|
for (participant in contractParticipants) {
|
||||||
|
let { participantFloAddress, tokenIdentification, userChoice, tokenAmount } = contractParticipants[participant]
|
||||||
|
frag.append(create.contractChoiceCard(participantFloAddress, tokenIdentification, userChoice, tokenAmount))
|
||||||
|
}
|
||||||
|
document.getElementById('participant_container').append(frag)
|
||||||
|
|
||||||
|
winners.forEach(winner => {
|
||||||
|
let { participantFloAddress, tokenIdentification, userChoice, tokenAmount, winningAmount } = winner;
|
||||||
|
frag.append(create.contractChoiceCard(participantFloAddress, tokenIdentification, userChoice, tokenAmount, winningAmount))
|
||||||
|
})
|
||||||
|
document.getElementById('winners_container').append(frag)
|
||||||
|
break
|
||||||
|
|
||||||
|
case "block_page":
|
||||||
|
let [blockInfo, blockTransactions] = await Promise.all([getBlockInfo(field), getBlockTransactions(field)])
|
||||||
|
debugger
|
||||||
|
pageContainer.append(create.blockPage(blockInfo));
|
||||||
|
pageTitle.textContent = "block";
|
||||||
|
loading()
|
||||||
|
appendTransactions('block_transaction_container', blockTransactions)
|
||||||
|
break
|
||||||
|
|
||||||
|
case "homepage":
|
||||||
|
pageHeader.classList.add("hide-completely");
|
||||||
|
let [data, latestTxs, latestBlocks] = await Promise.all([getBannerData(), getLatestTxs(), getAllBlocks(6)])
|
||||||
|
pageContainer.append(create.homepage(data));
|
||||||
|
loading();
|
||||||
|
|
||||||
|
// getAllSuggestions()
|
||||||
|
|
||||||
|
latestTxs.forEach(tx => {
|
||||||
|
if (tx["type"] == "tokentransfer")
|
||||||
|
frag.append(create.tokenTransferCard(tx))
|
||||||
|
else if (tx["type"] == "contracttransfer")
|
||||||
|
frag.append(create.contractTransferCard(tx));
|
||||||
|
})
|
||||||
|
document.getElementById("top_transaction_container").append(frag);
|
||||||
|
|
||||||
|
// todo - add latest blocks
|
||||||
|
for (block in latestBlocks) {
|
||||||
|
frag.append(create.blockCard(latestBlocks[block].height, latestBlocks[block].tx.length))
|
||||||
|
}
|
||||||
|
document.getElementById('top_blocks_container').append(frag)
|
||||||
|
break
|
||||||
|
|
||||||
|
case "all_blocks_page":
|
||||||
|
let allBlocks = await getAllBlocks(100);
|
||||||
|
pageContainer.append(create.allBlocksPage())
|
||||||
|
pageTitle.textContent = "All Blocks";
|
||||||
|
for (block in allBlocks) {
|
||||||
|
frag.append(create.blockCard(allBlocks[block].height, allBlocks[block].tx.length))
|
||||||
|
}
|
||||||
|
document.getElementById('all_blocks_page').append(frag)
|
||||||
|
loading()
|
||||||
|
break
|
||||||
|
|
||||||
|
case "all_transactions_page":
|
||||||
|
let allTxs = await getAllTxs();
|
||||||
|
pageTitle.textContent = "All Transactions";
|
||||||
|
pageContainer.append(create.alltransactionsPage())
|
||||||
|
appendTransactions('all_transactions_page', allTxs)
|
||||||
|
loading()
|
||||||
|
break
|
||||||
|
|
||||||
|
case "transaction_page":
|
||||||
|
const [status, txInfo] = await getTxInfo(field);
|
||||||
|
if (status) {
|
||||||
|
pageContainer.append(create.transactionPage(txInfo))
|
||||||
|
pageTitle.textContent = "transaction";
|
||||||
|
loading()
|
||||||
|
} else {
|
||||||
|
render('error_page', txInfo)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 'error_page':
|
||||||
|
pageContainer.append(create.errorPage(field));
|
||||||
|
loading()
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (pageId !== 'homepage')
|
||||||
|
pageHeader.classList.remove("hide-completely");
|
||||||
|
|
||||||
if (pageId === "token_page") {
|
|
||||||
let [tokenInfo, tokenBalances, tokenTransactions] = await Promise.all([getTokenInfo(field), getTokenBalances(field), getTokenTransactions(field)])
|
|
||||||
for (bal in tokenBalances) {
|
|
||||||
frag.append(create.addrBalanceCard(bal, tokenBalances[bal], tokenInfo.token))
|
|
||||||
}
|
|
||||||
pageContainer.append(create.tokenPage(tokenInfo));
|
|
||||||
pageTitle.textContent = "Token";
|
|
||||||
document.getElementById('token_balance_container').append(frag)
|
|
||||||
loading()
|
|
||||||
appendTransactions('token_transaction_container', tokenTransactions)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pageId === "contract_page") {
|
|
||||||
// todo: load contract variable dynamically
|
|
||||||
let contract = {
|
|
||||||
name: field.name,
|
|
||||||
address: field.address,
|
|
||||||
};
|
|
||||||
|
|
||||||
let [contractInfo, contractTransactions, contractParticipants] = await Promise.all([getContractInfo(contract), getContractTransactions(contract), getContractParticipants(contract)])
|
|
||||||
// todo : check the type of contract & then further checks like fetching details of contractParticipant
|
|
||||||
pageContainer.append(create.contractPage(contractInfo));
|
|
||||||
pageTitle.textContent = "Contract";
|
|
||||||
loading()
|
|
||||||
console.log(contractParticipants)
|
|
||||||
let winners = []
|
|
||||||
for (participant in contractParticipants) {
|
|
||||||
if (contractParticipants[participant].winningAmount)
|
|
||||||
winners.push(contractParticipants[participant])
|
|
||||||
}
|
|
||||||
// append latest transactions
|
|
||||||
appendTransactions('contract_transaction_container', contractTransactions)
|
|
||||||
for (participant in contractParticipants) {
|
|
||||||
let { participantFloAddress, tokenIdentification, userChoice, tokenAmount } = contractParticipants[participant]
|
|
||||||
frag.append(create.contractChoiceCard(participantFloAddress, tokenIdentification, userChoice, tokenAmount))
|
|
||||||
}
|
|
||||||
document.getElementById('participant_container').append(frag)
|
|
||||||
|
|
||||||
winners.forEach(winner => {
|
|
||||||
let { participantFloAddress, tokenIdentification, userChoice, tokenAmount, winningAmount } = winner;
|
|
||||||
frag.append(create.contractChoiceCard(participantFloAddress, tokenIdentification, userChoice, tokenAmount, winningAmount))
|
|
||||||
})
|
|
||||||
document.getElementById('winners_container').append(frag)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pageId === "block_page") {
|
|
||||||
let [blockInfo, blockTransactions] = await Promise.all([getBlockInfo(field), getBlockTransactions(field)])
|
|
||||||
debugger
|
|
||||||
pageContainer.append(create.blockPage(blockInfo));
|
|
||||||
pageTitle.textContent = "block";
|
|
||||||
loading()
|
|
||||||
appendTransactions('block_transaction_container', blockTransactions)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pageId === "homepage") {
|
|
||||||
pageHeader.classList.add("hide-completely");
|
|
||||||
let [data, latestTxs, latestBlocks] = await Promise.all([getBannerData(), getLatestTxs(), getAllBlocks(6)])
|
|
||||||
pageContainer.append(create.homepage(data));
|
|
||||||
loading();
|
|
||||||
|
|
||||||
// getAllSuggestions()
|
|
||||||
|
|
||||||
latestTxs.forEach(tx => {
|
|
||||||
if (tx["type"] == "tokentransfer")
|
|
||||||
frag.append(create.tokenTransferCard(tx))
|
|
||||||
else if (tx["type"] == "contracttransfer")
|
|
||||||
frag.append(create.contractTransferCard(tx));
|
|
||||||
})
|
|
||||||
document.getElementById("top_transaction_container").append(frag);
|
|
||||||
|
|
||||||
// todo - add latest blocks
|
|
||||||
for (block in latestBlocks) {
|
|
||||||
frag.append(create.blockCard(latestBlocks[block].height, latestBlocks[block].tx.length))
|
|
||||||
}
|
|
||||||
document.getElementById('top_blocks_container').append(frag)
|
|
||||||
} else pageHeader.classList.remove("hide-completely");
|
|
||||||
|
|
||||||
if (pageId === "all_blocks_page") {
|
|
||||||
let allBlocks = await getAllBlocks(100);
|
|
||||||
pageContainer.append(create.allBlocksPage())
|
|
||||||
pageTitle.textContent = "All Blocks";
|
|
||||||
for (block in allBlocks) {
|
|
||||||
frag.append(create.blockCard(allBlocks[block].height, allBlocks[block].tx.length))
|
|
||||||
}
|
|
||||||
document.getElementById('all_blocks_page').append(frag)
|
|
||||||
loading()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pageId === "all_transactions_page") {
|
|
||||||
let allTxs = await getAllTxs();
|
|
||||||
pageTitle.textContent = "All Transactions";
|
|
||||||
pageContainer.append(create.alltransactionsPage())
|
|
||||||
appendTransactions('all_transactions_page', allTxs)
|
|
||||||
loading()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pageId === "transaction_page") {
|
|
||||||
let txInfo = await getTxInfo(field);
|
|
||||||
pageContainer.append(create.transactionPage(txInfo))
|
|
||||||
pageTitle.textContent = "transaction";
|
|
||||||
loading()
|
|
||||||
}
|
|
||||||
prevField = field;
|
prevField = field;
|
||||||
if (pageContainer.querySelector('.tab.active'))
|
if (pageContainer.querySelector('.tab.active'))
|
||||||
pageContainer.querySelector('.tab.active').click()
|
pageContainer.querySelector('.tab.active').click()
|
||||||
@ -851,7 +874,7 @@
|
|||||||
let suggestions = document.getElementById('suggestions'),
|
let suggestions = document.getElementById('suggestions'),
|
||||||
mainSearch = document.getElementById("main_search_field");
|
mainSearch = document.getElementById("main_search_field");
|
||||||
|
|
||||||
document.getElementById('logo').addEventListener('click', function(e){
|
document.getElementById('logo').addEventListener('click', function (e) {
|
||||||
appState = {
|
appState = {
|
||||||
page: "homepage",
|
page: "homepage",
|
||||||
thisField: null,
|
thisField: null,
|
||||||
@ -864,10 +887,10 @@
|
|||||||
if (e.key === 'Enter') {
|
if (e.key === 'Enter') {
|
||||||
processNavbarSearch()
|
processNavbarSearch()
|
||||||
}
|
}
|
||||||
if(e.key === 'ArrowDown'){
|
if (e.key === 'ArrowDown') {
|
||||||
suggestions.firstElementChild.focus()
|
suggestions.firstElementChild.focus()
|
||||||
}
|
}
|
||||||
if(document.activeElement.classList.contains('suggestion'))
|
if (document.activeElement.classList.contains('suggestion'))
|
||||||
mainSearch.value = document.activeElement.textContent
|
mainSearch.value = document.activeElement.textContent
|
||||||
});
|
});
|
||||||
suggestions.addEventListener("keydown", function (e) {
|
suggestions.addEventListener("keydown", function (e) {
|
||||||
@ -876,8 +899,8 @@
|
|||||||
document.activeElement.nextElementSibling.focus()
|
document.activeElement.nextElementSibling.focus()
|
||||||
}
|
}
|
||||||
if (e.key === 'ArrowUp') {
|
if (e.key === 'ArrowUp') {
|
||||||
if (this.contains(document.activeElement)){
|
if (this.contains(document.activeElement)) {
|
||||||
if(document.activeElement.previousElementSibling)
|
if (document.activeElement.previousElementSibling)
|
||||||
document.activeElement.previousElementSibling.focus()
|
document.activeElement.previousElementSibling.focus()
|
||||||
else
|
else
|
||||||
mainSearch.focus()
|
mainSearch.focus()
|
||||||
@ -890,7 +913,7 @@
|
|||||||
console.log(document.activeElement)
|
console.log(document.activeElement)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
let themeToggler = document.getElementById("theme_toggle"),
|
let themeToggler = document.getElementById("theme_toggle"),
|
||||||
body = document.querySelector("body");
|
body = document.querySelector("body");
|
||||||
if (localStorage.theme === "dark") {
|
if (localStorage.theme === "dark") {
|
||||||
@ -1188,10 +1211,9 @@
|
|||||||
"transactionDetails"
|
"transactionDetails"
|
||||||
]["vin"][0]["addr"],
|
]["vin"][0]["addr"],
|
||||||
receiver: receiveraddress,
|
receiver: receiveraddress,
|
||||||
amount: `${
|
amount: `${latestTxs["latestTransactions"][txids[i]][
|
||||||
latestTxs["latestTransactions"][txids[i]][
|
|
||||||
"parsedFloData"
|
"parsedFloData"
|
||||||
]["tokenAmount"]
|
]["tokenAmount"]
|
||||||
}`,
|
}`,
|
||||||
type: "tokentransfer",
|
type: "tokentransfer",
|
||||||
});
|
});
|
||||||
@ -1226,20 +1248,17 @@
|
|||||||
"transactionDetails"
|
"transactionDetails"
|
||||||
]["vin"][0]["addr"],
|
]["vin"][0]["addr"],
|
||||||
receiver: receiveraddress,
|
receiver: receiveraddress,
|
||||||
amount: `${
|
amount: `${latestTxs["latestTransactions"][txids[i]][
|
||||||
latestTxs["latestTransactions"][txids[i]][
|
|
||||||
"parsedFloData"
|
"parsedFloData"
|
||||||
]["tokenAmount"]
|
]["tokenAmount"]
|
||||||
}`,
|
}`,
|
||||||
contractName: `${
|
contractName: `${latestTxs["latestTransactions"][txids[i]][
|
||||||
latestTxs["latestTransactions"][txids[i]][
|
|
||||||
"parsedFloData"
|
"parsedFloData"
|
||||||
]["contractName"]
|
]["contractName"]
|
||||||
}`,
|
}`,
|
||||||
userChoice: `${
|
userChoice: `${latestTxs["latestTransactions"][txids[i]][
|
||||||
latestTxs["latestTransactions"][txids[i]][
|
|
||||||
"parsedFloData"
|
"parsedFloData"
|
||||||
]["userChoice"]
|
]["userChoice"]
|
||||||
}`,
|
}`,
|
||||||
type: "contracttransfer",
|
type: "contracttransfer",
|
||||||
});
|
});
|
||||||
@ -1459,21 +1478,20 @@
|
|||||||
let transferType = txList[txids[i]]["parsedFloData"]["transferType"]
|
let transferType = txList[txids[i]]["parsedFloData"]["transferType"]
|
||||||
if (transferType == "token") {
|
if (transferType == "token") {
|
||||||
let receiveraddress = "";
|
let receiveraddress = "";
|
||||||
for (let i = 0, voutlist = txList[txids[i]]["transactionDetails"]["vout"]; i<voutlist.length; i++) {
|
for (let i = 0, voutlist = txList[txids[i]]["transactionDetails"]["vout"]; i < voutlist.length; i++) {
|
||||||
if(txList[txids[i]] != undefined){
|
if (txList[txids[i]] != undefined) {
|
||||||
if (voutlist[i]["scriptPubKey"]["addresses"][0] != txList[txids[i]]["transactionDetails"]["vin"][0]["addr"]) {
|
if (voutlist[i]["scriptPubKey"]["addresses"][0] != txList[txids[i]]["transactionDetails"]["vin"][0]["addr"]) {
|
||||||
receiveraddress = voutlist[i]["scriptPubKey"]["addresses"][0];
|
receiveraddress = voutlist[i]["scriptPubKey"]["addresses"][0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
obj = Object.assign({}, obj, {
|
obj = Object.assign({}, obj, {
|
||||||
sender: txList[txids[i]]["transactionDetails"]["vin"][0]["addr"],
|
sender: txList[txids[i]]["transactionDetails"]["vin"][0]["addr"],
|
||||||
receiver: receiveraddress,
|
receiver: receiveraddress,
|
||||||
amount: `${
|
amount: `${txList[txids[i]][
|
||||||
txList[txids[i]][
|
|
||||||
"parsedFloData"
|
"parsedFloData"
|
||||||
]["tokenAmount"]
|
]["tokenAmount"]
|
||||||
}`,
|
}`,
|
||||||
type: "tokentransfer",
|
type: "tokentransfer",
|
||||||
});
|
});
|
||||||
@ -1511,20 +1529,17 @@
|
|||||||
"transactionDetails"
|
"transactionDetails"
|
||||||
]["vin"][0]["addr"],
|
]["vin"][0]["addr"],
|
||||||
receiver: receiveraddress,
|
receiver: receiveraddress,
|
||||||
amount: `${
|
amount: `${txList[txids[i]][
|
||||||
txList[txids[i]][
|
|
||||||
"parsedFloData"
|
"parsedFloData"
|
||||||
]["tokenAmount"]
|
]["tokenAmount"]
|
||||||
}`,
|
}`,
|
||||||
contractName: `${
|
contractName: `${txList[txids[i]][
|
||||||
txList[txids[i]][
|
|
||||||
"parsedFloData"
|
"parsedFloData"
|
||||||
]["contractName"]
|
]["contractName"]
|
||||||
}`,
|
}`,
|
||||||
userChoice: `${
|
userChoice: `${txList[txids[i]][
|
||||||
txList[txids[i]][
|
|
||||||
"parsedFloData"
|
"parsedFloData"
|
||||||
]["userChoice"]
|
]["userChoice"]
|
||||||
}`,
|
}`,
|
||||||
type: "contracttransfer",
|
type: "contracttransfer",
|
||||||
});
|
});
|
||||||
@ -1644,38 +1659,49 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getTxInfo(thisTx) {
|
async function getTxInfo(thisTx) {
|
||||||
var response = await fetch(`${tokenapiUrl}/api/v1.0/getTransactionDetails/${thisTx}`),
|
try {
|
||||||
transaction = await response.json(),
|
const response = await fetch(`${tokenapiUrl}/api/v1.0/getTransactionDetails/${thisTx}`),
|
||||||
transactionHash = transaction.transactionHash,
|
transaction = await response.json();
|
||||||
{ flodata, tokenAmount, tokenIdentification, type } = transaction.parsedFloData,
|
if (transaction.result === 'error') {
|
||||||
{ blockheight, vin, vout, confirmations } = transaction.transactionDetails;
|
return [false, transaction.description]
|
||||||
let receiver = "",
|
} else {
|
||||||
sender = vin[0].addr;
|
let transactionHash = transaction.transactionHash,
|
||||||
for (let i = 0; i < vout.length; i++) {
|
{ flodata, tokenAmount, tokenIdentification, type } = transaction.parsedFloData,
|
||||||
if (vout[i]["scriptPubKey"]["addresses"][0] !== vin[0]["addr"]) {
|
{ blockheight, vin, vout, confirmations } = transaction.transactionDetails;
|
||||||
receiver = vout[i]["scriptPubKey"]["addresses"][0];
|
let receiver = "",
|
||||||
|
sender = vin[0].addr;
|
||||||
|
for (let i = 0; i < vout.length; i++) {
|
||||||
|
if (vout[i]["scriptPubKey"]["addresses"][0] !== vin[0]["addr"]) {
|
||||||
|
receiver = vout[i]["scriptPubKey"]["addresses"][0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(transaction)
|
||||||
|
// todo - temporary fixes below. Fix these on the Databse and API level
|
||||||
|
let transactionType = ''
|
||||||
|
if (type == 'transfer') {
|
||||||
|
transactionType = transaction.parsedFloData?.transferType
|
||||||
|
}
|
||||||
|
if (type == 'smartContractPays') {
|
||||||
|
tokenAmount = '-'
|
||||||
|
flodata = transaction.transactionDetails.floData
|
||||||
|
}
|
||||||
|
return [
|
||||||
|
true, {
|
||||||
|
type: `${transactionType} ${type}`,
|
||||||
|
name: tokenIdentification,
|
||||||
|
blockHeight: blockheight,
|
||||||
|
amount: tokenAmount,
|
||||||
|
sender: sender,
|
||||||
|
receiver: receiver,
|
||||||
|
floData: flodata,
|
||||||
|
hash: transactionHash,
|
||||||
|
confirmations: confirmations
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(transaction)
|
catch (err) {
|
||||||
// todo - temporary fixes below. Fix these on the Databse and API level
|
console.error(err)
|
||||||
let transactionType = ''
|
|
||||||
if( type=='transfer'){
|
|
||||||
transactionType = transaction.parsedFloData?.transferType
|
|
||||||
}
|
|
||||||
if( type=='smartContractPays'){
|
|
||||||
tokenAmount = '-'
|
|
||||||
flodata = transaction.transactionDetails.floData
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
type: `${transactionType} ${type}`,
|
|
||||||
name: tokenIdentification,
|
|
||||||
blockHeight: blockheight,
|
|
||||||
amount: tokenAmount,
|
|
||||||
sender: sender,
|
|
||||||
receiver: receiver,
|
|
||||||
floData: flodata,
|
|
||||||
hash: transactionHash,
|
|
||||||
confirmations: confirmations
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1746,7 +1772,7 @@
|
|||||||
var contractSplit = splitContractNameAddress(window.ranchimallflo.smartcontractnameaddresslist[i], window.ranchimallflo.smartcontractnameaddresslist[i].lastIndexOf('-'));
|
var contractSplit = splitContractNameAddress(window.ranchimallflo.smartcontractnameaddresslist[i], window.ranchimallflo.smartcontractnameaddresslist[i].lastIndexOf('-'));
|
||||||
|
|
||||||
if (window.ranchimallflo.smartcontractnamelist.includes(text)) {
|
if (window.ranchimallflo.smartcontractnamelist.includes(text)) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
@ -1777,7 +1803,7 @@
|
|||||||
} else {
|
} else {
|
||||||
//console.log('data entered is noise');
|
//console.log('data entered is noise');
|
||||||
}
|
}
|
||||||
});
|
}).catch(err => console.error(err))
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//console.log('data entered is noise')
|
//console.log('data entered is noise')
|
||||||
@ -1831,7 +1857,7 @@
|
|||||||
|
|
||||||
var suggestions = document.getElementById("suggestions");
|
var suggestions = document.getElementById("suggestions");
|
||||||
var userinput = document.getElementById("main_search_field");
|
var userinput = document.getElementById("main_search_field");
|
||||||
|
|
||||||
suggestions.addEventListener("click", accept_suggestion, true);
|
suggestions.addEventListener("click", accept_suggestion, true);
|
||||||
|
|
||||||
window.suggestion = function (str) {
|
window.suggestion = function (str) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user