This commit is contained in:
sairaj mote 2020-09-10 19:54:34 +05:30
parent 8e263559aa
commit 180bcd67c5
4 changed files with 424 additions and 314 deletions

View File

@ -697,19 +697,19 @@ form {
transform: scale(0.95); transform: scale(0.95);
} }
.options-tab .option:nth-of-type(1) .icon { .options-tab .option:nth-of-type(1) .icon {
background: #D32F2F; background: linear-gradient(135deg, #D32F2F 50%, #B71C1C 50%);
} }
.options-tab .option:nth-of-type(2) .icon { .options-tab .option:nth-of-type(2) .icon {
background: #7B1FA2; background: linear-gradient(135deg, #7B1FA2 50%, #4A148C 50%);
} }
.options-tab .option:nth-of-type(3) .icon { .options-tab .option:nth-of-type(3) .icon {
background: #303F9F; background: linear-gradient(135deg, #1976D2 50%, #0D47A1 50%);
} }
.options-tab .option:nth-of-type(4) .icon { .options-tab .option:nth-of-type(4) .icon {
background: #1976D2; background: linear-gradient(135deg, #388E3C 50%, #1B5E20 50%);
} }
.options-tab .option:nth-of-type(5) .icon { .options-tab .option:nth-of-type(5) .icon {
background: #388E3C; background: linear-gradient(135deg, #F57C00 50%, #E65100 50%);
} }
.notification-dot::after { .notification-dot::after {
@ -744,7 +744,8 @@ sm-tab-header {
} }
sm-tab::part(tab) { sm-tab::part(tab) {
padding: 0.8rem 0; padding: 0.8rem 0.4rem;
text-transform: uppercase;
} }
sm-panel { sm-panel {
@ -1100,6 +1101,11 @@ sm-panel {
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
} }
.user-panel {
position: sticky;
top: 1.5rem;
}
} }
@media only screen and (min-width: 1920px) { @media only screen and (min-width: 1920px) {
body { body {

2
css/main.min.css vendored

File diff suppressed because one or more lines are too long

View File

@ -689,7 +689,6 @@ form {
position: relative; position: relative;
padding: 1.5rem; padding: 1.5rem;
border-radius: 0.6rem; border-radius: 0.6rem;
//background: linear-gradient(160deg, #ffffff10 50%, #00000040 80%), linear-gradient(-120deg, #ffffff10 50%, #00000040 10%), midnightblue;
background: radial-gradient(circle at top left, #EF6C00 20%, #C51162 30%, #4A148C 40%, #251f44); background: radial-gradient(circle at top left, #EF6C00 20%, #C51162 30%, #4A148C 40%, #251f44);
box-shadow: 0 0.1rem 0.1rem #00000020, 0 2rem 1rem -1rem #00000040; box-shadow: 0 0.1rem 0.1rem #00000020, 0 2rem 1rem -1rem #00000040;
color: rgba(var(--foreground-color), 1); color: rgba(var(--foreground-color), 1);
@ -757,31 +756,31 @@ form {
&:nth-of-type(1) { &:nth-of-type(1) {
.icon { .icon {
background: #D32F2F; background: linear-gradient(135deg, #D32F2F 50%, #B71C1C 50%);
} }
} }
&:nth-of-type(2) { &:nth-of-type(2) {
.icon { .icon {
background: #7B1FA2; background: linear-gradient(135deg, #7B1FA2 50%, #4A148C 50%);
} }
} }
&:nth-of-type(3) { &:nth-of-type(3) {
.icon { .icon {
background: #303F9F; background: linear-gradient(135deg, #1976D2 50%, #0D47A1 50%);
} }
} }
&:nth-of-type(4) { &:nth-of-type(4) {
.icon { .icon {
background: #1976D2; background: linear-gradient(135deg, #388E3C 50%, #1B5E20 50%);
} }
} }
&:nth-of-type(5) { &:nth-of-type(5) {
.icon { .icon {
background: #388E3C; background: linear-gradient(135deg, #F57C00 50%, #E65100 50%);
} }
} }
} }
@ -820,7 +819,8 @@ sm-tab-header {
border-bottom: solid 1px rgba(var(--text-color), 0.2); border-bottom: solid 1px rgba(var(--text-color), 0.2);
} }
sm-tab::part(tab){ sm-tab::part(tab){
padding: 0.8rem 0; padding: 0.8rem 0.4rem;
text-transform: uppercase;
} }
sm-panel{ sm-panel{
width: 100%; width: 100%;
@ -1234,6 +1234,10 @@ sm-panel{
flex-direction: column; flex-direction: column;
} }
} }
.user-panel{
position: sticky;
top: 1.5rem;
}
} }
@media only screen and (min-width: 1920px) { @media only screen and (min-width: 1920px) {

View File

@ -348,7 +348,7 @@
<title>settings</title> <title>settings</title>
<path d="M41,62.92a1.7,1.7,0,0,1-1.45-.83L37,57.7a2.63,2.63,0,0,0-2.27-1.34h-.26a23.91,23.91,0,0,1-5,0h-.26A2.63,2.63,0,0,0,27,57.7l-2.54,4.39a1.67,1.67,0,0,1-1.44.83,1.72,1.72,0,0,1-.83-.22L10.33,55.86a1.67,1.67,0,0,1-.61-2.27l2.54-4.41a2.61,2.61,0,0,0-.12-2.85A23.77,23.77,0,0,1,9.65,42,2.65,2.65,0,0,0,7.24,40.5H2.17A1.67,1.67,0,0,1,.5,38.83V25.17A1.67,1.67,0,0,1,2.17,23.5H7.24A2.64,2.64,0,0,0,9.65,22a25,25,0,0,1,2.49-4.31,2.63,2.63,0,0,0,.12-2.85l-2.54-4.4a1.67,1.67,0,0,1,.61-2.27L22.17,1.3A1.72,1.72,0,0,1,23,1.08a1.67,1.67,0,0,1,1.44.83L27,6.3a2.63,2.63,0,0,0,2.27,1.34h.26a23.91,23.91,0,0,1,5,0h.26A2.63,2.63,0,0,0,37,6.3l2.53-4.39A1.7,1.7,0,0,1,41,1.08a1.72,1.72,0,0,1,.83.22L53.67,8.14a1.67,1.67,0,0,1,.61,2.27l-2.54,4.41a2.61,2.61,0,0,0,.12,2.85A24.46,24.46,0,0,1,54.35,22a2.65,2.65,0,0,0,2.41,1.52h5.07a1.67,1.67,0,0,1,1.67,1.67V38.83a1.67,1.67,0,0,1-1.67,1.67H56.76A2.63,2.63,0,0,0,54.35,42a24.63,24.63,0,0,1-2.49,4.31,2.63,2.63,0,0,0-.12,2.85l2.54,4.4a1.68,1.68,0,0,1-.61,2.27L41.83,62.7A1.72,1.72,0,0,1,41,62.92Z"/> <path d="M41,62.92a1.7,1.7,0,0,1-1.45-.83L37,57.7a2.63,2.63,0,0,0-2.27-1.34h-.26a23.91,23.91,0,0,1-5,0h-.26A2.63,2.63,0,0,0,27,57.7l-2.54,4.39a1.67,1.67,0,0,1-1.44.83,1.72,1.72,0,0,1-.83-.22L10.33,55.86a1.67,1.67,0,0,1-.61-2.27l2.54-4.41a2.61,2.61,0,0,0-.12-2.85A23.77,23.77,0,0,1,9.65,42,2.65,2.65,0,0,0,7.24,40.5H2.17A1.67,1.67,0,0,1,.5,38.83V25.17A1.67,1.67,0,0,1,2.17,23.5H7.24A2.64,2.64,0,0,0,9.65,22a25,25,0,0,1,2.49-4.31,2.63,2.63,0,0,0,.12-2.85l-2.54-4.4a1.67,1.67,0,0,1,.61-2.27L22.17,1.3A1.72,1.72,0,0,1,23,1.08a1.67,1.67,0,0,1,1.44.83L27,6.3a2.63,2.63,0,0,0,2.27,1.34h.26a23.91,23.91,0,0,1,5,0h.26A2.63,2.63,0,0,0,37,6.3l2.53-4.39A1.7,1.7,0,0,1,41,1.08a1.72,1.72,0,0,1,.83.22L53.67,8.14a1.67,1.67,0,0,1,.61,2.27l-2.54,4.41a2.61,2.61,0,0,0,.12,2.85A24.46,24.46,0,0,1,54.35,22a2.65,2.65,0,0,0,2.41,1.52h5.07a1.67,1.67,0,0,1,1.67,1.67V38.83a1.67,1.67,0,0,1-1.67,1.67H56.76A2.63,2.63,0,0,0,54.35,42a24.63,24.63,0,0,1-2.49,4.31,2.63,2.63,0,0,0-.12,2.85l2.54,4.4a1.68,1.68,0,0,1-.61,2.27L41.83,62.7A1.72,1.72,0,0,1,41,62.92Z"/>
<path d="M23,1.58h0a1.16,1.16,0,0,1,1,.58l2.54,4.39a3.14,3.14,0,0,0,2.7,1.59l.31,0C30.37,8,31.19,8,32,8s1.63,0,2.44.12l.31,0a3.14,3.14,0,0,0,2.7-1.59L40,2.16a1.16,1.16,0,0,1,1-.58,1.1,1.1,0,0,1,.58.16L53.42,8.57a1.16,1.16,0,0,1,.42,1.59L51.3,14.57a3.15,3.15,0,0,0,.15,3.4,23.69,23.69,0,0,1,2.45,4.21A3.12,3.12,0,0,0,56.76,24h5.07A1.17,1.17,0,0,1,63,25.17V38.83A1.17,1.17,0,0,1,61.83,40H56.76a3.11,3.11,0,0,0-2.86,1.82,24.33,24.33,0,0,1-2.44,4.23,3.11,3.11,0,0,0-.15,3.39l2.53,4.4a1.13,1.13,0,0,1,.12.88,1.17,1.17,0,0,1-.54.71L41.58,62.26a1.08,1.08,0,0,1-.58.16,1.16,1.16,0,0,1-1-.58l-2.54-4.39a3.14,3.14,0,0,0-2.7-1.59l-.31,0C33.63,56,32.81,56,32,56s-1.63,0-2.44-.12l-.31,0a3.14,3.14,0,0,0-2.7,1.59L24,61.84a1.16,1.16,0,0,1-1,.58,1.1,1.1,0,0,1-.58-.16L10.58,55.43a1.16,1.16,0,0,1-.42-1.59l2.54-4.41a3.15,3.15,0,0,0-.15-3.4,23.69,23.69,0,0,1-2.45-4.21A3.12,3.12,0,0,0,7.24,40H2.17A1.17,1.17,0,0,1,1,38.83V25.17A1.17,1.17,0,0,1,2.17,24H7.24a3.11,3.11,0,0,0,2.86-1.82A24.33,24.33,0,0,1,12.54,18a3.11,3.11,0,0,0,.15-3.39l-2.53-4.4a1.16,1.16,0,0,1,.42-1.59L22.42,1.74A1.08,1.08,0,0,1,23,1.58m0-1a2.11,2.11,0,0,0-1.08.29L10.08,7.7a2.17,2.17,0,0,0-.79,3l2.54,4.4a2.15,2.15,0,0,1-.1,2.31,24.92,24.92,0,0,0-2.54,4.4A2.13,2.13,0,0,1,7.24,23H2.17A2.17,2.17,0,0,0,0,25.17V38.83A2.17,2.17,0,0,0,2.17,41H7.24a2.13,2.13,0,0,1,1.95,1.23,25.25,25.25,0,0,0,2.55,4.39,2.13,2.13,0,0,1,.09,2.31L9.29,53.34a2.17,2.17,0,0,0,.79,3l11.84,6.83a2.11,2.11,0,0,0,1.08.29,2.17,2.17,0,0,0,1.88-1.08L27.41,58a2.14,2.14,0,0,1,1.84-1.09h.21a24.88,24.88,0,0,0,5.08,0h.21A2.14,2.14,0,0,1,36.59,58l2.53,4.39A2.17,2.17,0,0,0,41,63.42a2.11,2.11,0,0,0,1.08-.29L53.92,56.3a2.17,2.17,0,0,0,.79-3l-2.54-4.4a2.15,2.15,0,0,1,.1-2.31,24.92,24.92,0,0,0,2.54-4.4A2.13,2.13,0,0,1,56.76,41h5.07A2.17,2.17,0,0,0,64,38.83V25.17A2.17,2.17,0,0,0,61.83,23H56.76a2.13,2.13,0,0,1-1.95-1.23,25.25,25.25,0,0,0-2.55-4.39,2.13,2.13,0,0,1-.09-2.31l2.54-4.41a2.17,2.17,0,0,0-.79-3L42.08.87A2.11,2.11,0,0,0,41,.58a2.17,2.17,0,0,0-1.88,1.08L36.59,6.05a2.14,2.14,0,0,1-1.84,1.09h-.21a24.88,24.88,0,0,0-5.08,0h-.21a2.14,2.14,0,0,1-1.84-1.09L24.88,1.66A2.17,2.17,0,0,0,23,.58Z"/><circle class="a" cx="32" cy="32" r="11.5"/><path d="M32,21A11,11,0,1,1,21,32,11,11,0,0,1,32,21m0-1A12,12,0,1,0,44,32,12,12,0,0,0,32,20Z"/> <path d="M23,1.58h0a1.16,1.16,0,0,1,1,.58l2.54,4.39a3.14,3.14,0,0,0,2.7,1.59l.31,0C30.37,8,31.19,8,32,8s1.63,0,2.44.12l.31,0a3.14,3.14,0,0,0,2.7-1.59L40,2.16a1.16,1.16,0,0,1,1-.58,1.1,1.1,0,0,1,.58.16L53.42,8.57a1.16,1.16,0,0,1,.42,1.59L51.3,14.57a3.15,3.15,0,0,0,.15,3.4,23.69,23.69,0,0,1,2.45,4.21A3.12,3.12,0,0,0,56.76,24h5.07A1.17,1.17,0,0,1,63,25.17V38.83A1.17,1.17,0,0,1,61.83,40H56.76a3.11,3.11,0,0,0-2.86,1.82,24.33,24.33,0,0,1-2.44,4.23,3.11,3.11,0,0,0-.15,3.39l2.53,4.4a1.13,1.13,0,0,1,.12.88,1.17,1.17,0,0,1-.54.71L41.58,62.26a1.08,1.08,0,0,1-.58.16,1.16,1.16,0,0,1-1-.58l-2.54-4.39a3.14,3.14,0,0,0-2.7-1.59l-.31,0C33.63,56,32.81,56,32,56s-1.63,0-2.44-.12l-.31,0a3.14,3.14,0,0,0-2.7,1.59L24,61.84a1.16,1.16,0,0,1-1,.58,1.1,1.1,0,0,1-.58-.16L10.58,55.43a1.16,1.16,0,0,1-.42-1.59l2.54-4.41a3.15,3.15,0,0,0-.15-3.4,23.69,23.69,0,0,1-2.45-4.21A3.12,3.12,0,0,0,7.24,40H2.17A1.17,1.17,0,0,1,1,38.83V25.17A1.17,1.17,0,0,1,2.17,24H7.24a3.11,3.11,0,0,0,2.86-1.82A24.33,24.33,0,0,1,12.54,18a3.11,3.11,0,0,0,.15-3.39l-2.53-4.4a1.16,1.16,0,0,1,.42-1.59L22.42,1.74A1.08,1.08,0,0,1,23,1.58m0-1a2.11,2.11,0,0,0-1.08.29L10.08,7.7a2.17,2.17,0,0,0-.79,3l2.54,4.4a2.15,2.15,0,0,1-.1,2.31,24.92,24.92,0,0,0-2.54,4.4A2.13,2.13,0,0,1,7.24,23H2.17A2.17,2.17,0,0,0,0,25.17V38.83A2.17,2.17,0,0,0,2.17,41H7.24a2.13,2.13,0,0,1,1.95,1.23,25.25,25.25,0,0,0,2.55,4.39,2.13,2.13,0,0,1,.09,2.31L9.29,53.34a2.17,2.17,0,0,0,.79,3l11.84,6.83a2.11,2.11,0,0,0,1.08.29,2.17,2.17,0,0,0,1.88-1.08L27.41,58a2.14,2.14,0,0,1,1.84-1.09h.21a24.88,24.88,0,0,0,5.08,0h.21A2.14,2.14,0,0,1,36.59,58l2.53,4.39A2.17,2.17,0,0,0,41,63.42a2.11,2.11,0,0,0,1.08-.29L53.92,56.3a2.17,2.17,0,0,0,.79-3l-2.54-4.4a2.15,2.15,0,0,1,.1-2.31,24.92,24.92,0,0,0,2.54-4.4A2.13,2.13,0,0,1,56.76,41h5.07A2.17,2.17,0,0,0,64,38.83V25.17A2.17,2.17,0,0,0,61.83,23H56.76a2.13,2.13,0,0,1-1.95-1.23,25.25,25.25,0,0,0-2.55-4.39,2.13,2.13,0,0,1-.09-2.31l2.54-4.41a2.17,2.17,0,0,0-.79-3L42.08.87A2.11,2.11,0,0,0,41,.58a2.17,2.17,0,0,0-1.88,1.08L36.59,6.05a2.14,2.14,0,0,1-1.84,1.09h-.21a24.88,24.88,0,0,0-5.08,0h-.21a2.14,2.14,0,0,1-1.84-1.09L24.88,1.66A2.17,2.17,0,0,0,23,.58Z"/><circle class="a" cx="32" cy="32" r="11.5"/><path d="M32,21A11,11,0,1,1,21,32,11,11,0,0,1,32,21m0-1A12,12,0,1,0,44,32,12,12,0,0,0,32,20Z"/>
</svg> </svg>
<h5>Settings</h5> <h5>Settings</h5>
</div> </div>
</nav> </nav>
@ -357,91 +357,95 @@
<div class="left"> <div class="left">
<h4>Rupee actions</h4> <h4>Rupee actions</h4>
<sm-carousel class="options-tab"> <sm-carousel class="options-tab">
<div class="option" onclick="showPopup('cash_transfer')"> <div class="option" onclick="showPopup('cash_transfer')">
<svg class="icon" viewBox="0 0 64 64"> <svg class="icon" viewBox="0 0 64 64">
<path d="M47.28,16.8,29.6,34.64a3.3,3.3,0,0,1-3.59.71L2.5,25.42a3.28,3.28,0,0,1,.26-6.13L59.21.87A3.28,3.28,0,0,1,63.32,5l-18.93,56a3.26,3.26,0,0,1-6.12.18l-6.4-15.68"/> <path d="M47.28,16.8,29.6,34.64a3.3,3.3,0,0,1-3.59.71L2.5,25.42a3.28,3.28,0,0,1,.26-6.13L59.21.87A3.28,3.28,0,0,1,63.32,5l-18.93,56a3.26,3.26,0,0,1-6.12.18l-6.4-15.68"/>
</svg> </svg>
<h4>Send</h4> <h4>Send</h4>
</div> </div>
<div class="option" onclick="showPopup('deposit_rupee')"> <div class="option" onclick="showPopup('deposit_rupee')">
<svg class="icon banking" viewBox="0 0 52 51.5"> <svg class="icon banking" viewBox="0 0 52 51.5">
<line x1="4" y1="28" x2="4" y2="19.5" /> <line x1="4" y1="28" x2="4" y2="19.5" />
<polyline points="4 6 4 1 51 1 51 48 4 48 4 41.5" /> <polyline points="4 6 4 1 51 1 51 48 4 48 4 41.5" />
<line x1="9" y1="50" x2="18" y2="50" /> <line x1="9" y1="50" x2="18" y2="50" />
<line x1="36" y1="50" x2="45" y2="50" /> <line x1="36" y1="50" x2="45" y2="50" />
<circle cx="27.5" cy="30" r="9.5" /> <circle cx="27.5" cy="30" r="9.5" />
<circle cx="27.5" cy="30" r="3.5" /> <circle cx="27.5" cy="30" r="3.5" />
<rect x="1" y="6" width="6" height="13.5" rx="2.76" /> <rect x="1" y="6" width="6" height="13.5" rx="2.76" />
<rect x="1" y="28" width="6" height="13.5" rx="2.76" /> <rect x="1" y="28" width="6" height="13.5" rx="2.76" />
</svg> </svg>
<h4>deposit</h4> <h4>deposit</h4>
</div> </div>
<div class="option" onclick="showPopup('withdraw_rupee')"> <div class="option" onclick="showPopup('withdraw_rupee')">
<svg class="icon banking" viewBox="0 0 52 60"> <svg class="icon banking" viewBox="0 0 52 60">
<line x1="4" y1="33.5" x2="4" y2="25" /> <line x1="4" y1="33.5" x2="4" y2="25" />
<polyline points="41.52 6.5 51 6.5 51 53.5 41.69 53.5" /> <polyline points="41.52 6.5 51 6.5 51 53.5 41.69 53.5" />
<line x1="9" y1="55.5" x2="14" y2="55.5" /> <line x1="9" y1="55.5" x2="14" y2="55.5" />
<line x1="43" y1="55.5" x2="45" y2="55.5" /> <line x1="43" y1="55.5" x2="45" y2="55.5" />
<rect x="1" y="11.5" width="6" height="13.5" rx="2.76" /> <rect x="1" y="11.5" width="6" height="13.5" rx="2.76" />
<rect x="1" y="33.5" width="6" height="13.5" rx="2.76" /> <rect x="1" y="33.5" width="6" height="13.5" rx="2.76" />
<polyline points="3.81 11.5 3.81 6.5 41.5 1 41.69 59 3.81 53.5 3.81 47" /> <polyline points="3.81 11.5 3.81 6.5 41.5 1 41.69 59 3.81 53.5 3.81 47" />
<path <path
d="M35.64,39.19c0,6.31-3.25,11.45-7.22,11.48s-7-4.92-7-11.07,3.13-11.29,7.05-11.48S35.64,32.88,35.64,39.19Z" d="M35.64,39.19c0,6.31-3.25,11.45-7.22,11.48s-7-4.92-7-11.07,3.13-11.29,7.05-11.48S35.64,32.88,35.64,39.19Z"
transform="translate(-6 -2)" /> transform="translate(-6 -2)" />
<path <path
d="M31.06,39.32c0,2.31-1.19,4.2-2.64,4.23s-2.62-1.79-2.62-4.08S27,35.3,28.42,35.24,31.06,37,31.06,39.32Z" d="M31.06,39.32c0,2.31-1.19,4.2-2.64,4.23s-2.62-1.79-2.62-4.08S27,35.3,28.42,35.24,31.06,37,31.06,39.32Z"
transform="translate(-6 -2)" /> transform="translate(-6 -2)" />
</svg> </svg>
<h4>Withdraw</h4> <h4>Withdraw</h4>
</div> </div>
<div class="option" onclick="showPopup('request_rupee')"> <div class="option" onclick="showPopup('request_rupee')">
<svg class="icon" viewBox="0 0 64 64"> <svg class="icon" viewBox="0 0 64 64">
<title>request</title> <title>request</title>
<path <path
d="M24,26.19a8.67,8.67,0,0,1-.24-3.61,8.34,8.34,0,0,1,16.59,1.27c0,8.35-8.66,8.16-8.34,11.58,0,.09,0,4.73,0,4.73" /> d="M24,26.19a8.67,8.67,0,0,1-.24-3.61,8.34,8.34,0,0,1,16.59,1.27c0,8.35-8.66,8.16-8.34,11.58,0,.09,0,4.73,0,4.73" />
<line x1="32" y1="47.08" x2="32" y2="48.99" /> <line x1="32" y1="47.08" x2="32" y2="48.99" />
<path <path
d="M32,.5h0A31.5,31.5,0,0,1,63.5,32v0A31.5,31.5,0,0,1,32,63.5H2.48a2,2,0,0,1-2-2V32A31.5,31.5,0,0,1,32,.5Z" /> d="M32,.5h0A31.5,31.5,0,0,1,63.5,32v0A31.5,31.5,0,0,1,32,63.5H2.48a2,2,0,0,1-2-2V32A31.5,31.5,0,0,1,32,.5Z" />
</svg> </svg>
<h4>Request</h4> <h4>Request</h4>
</div> </div>
<div class="option" onclick="showPopup('pay_anyone')"> <div class="option" onclick="showPopup('pay_anyone')">
<svg class="icon" viewBox="0 0 64 64"> <svg class="icon" viewBox="0 0 64 64">
<path d="M32,37.75A10.19,10.19,0,1,0,21.81,27.44V46.62" /> <path d="M32,37.75A10.19,10.19,0,1,0,21.81,27.44V46.62" />
<rect height="64" width="64" rx="8"></rect> <rect height="64" width="64" rx="8"></rect>
</svg> </svg>
<h4>pay through cashier</h4> <h4>pay through cashier</h4>
</a> </a>
</div> </div>
</sm-carousel> </sm-carousel>
</div> </div>
<div class="user-panel"> <div class="user-panel">
<h4 class="user-type">User</h4> <h4 class="user-type">User</h4>
<div class="copy-row"> <div class="copy-row">
<h4 class="user-flo-id copy"></h4> <h4 class="user-flo-id copy"></h4>
<svg class="icon" onclick="copyToClipboard(this.parentNode)" viewBox="0 0 64 64"> <svg class="icon" onclick="copyToClipboard(this.parentNode)" viewBox="0 0 64 64">
<title>Copy</title> <title>Copy</title>
<rect x="16" y="16" width="48" height="48" rx="6" /> <rect x="16" y="16" width="48" height="48" rx="6" />
<path d="M.5,47.52V6.5a6,6,0,0,1,6-6h41" /> <path d="M.5,47.52V6.5a6,6,0,0,1,6-6h41" />
</svg> </svg>
</div> </div>
<div class="flex align-items space-between"> <div class="flex align-items space-between">
<h4>Balance</h4> <h4>Balance</h4>
<svg class="icon" onclick="refresh_balance(this)" viewBox="0 0 64 64"> <svg class="icon" onclick="refresh_balance(this)" viewBox="0 0 64 64">
<title>refresh balance</title> <title>refresh balance</title>
<polyline points="42.99 0.16 50.25 21.23 28.78 27.7"/> <polyline points="42.99 0.16 50.25 21.23 28.78 27.7"/>
<path d="M56.61,44.63A24.65,24.65,0,0,1,50,56.24a25.1,25.1,0,0,1-35.31,0,24.67,24.67,0,0,1,0-35,25.1,25.1,0,0,1,35.31,0"/> <path d="M56.61,44.63A24.65,24.65,0,0,1,50,56.24a25.1,25.1,0,0,1-35.31,0,24.67,24.67,0,0,1,0-35,25.1,25.1,0,0,1,35.31,0"/>
</svg> </svg>
</div> </div>
<div id="display_balance" class="grid grid-2"> <div id="display_balance" class="grid grid-2">
<div class="balance"> <div class="balance">
<h5>Rupee</h5> <h5>Rupee</h5>
<h3 class="token-balance">0</h3> <h3 class="token-balance">0</h3>
</div> </div>
<div class="balance"> <div class="balance">
<h5>FLO</h5> <h5>Unconfirmed Rupee</h5>
<h3 class="uncnf-token-balance">0</h3>
</div>
<div class="balance">
<h5>FLO</h5>
<h3 class="flo-balance">0</h3> <h3 class="flo-balance">0</h3>
</div> </div>
</div> </div>
</div> </div>
</section> </section>
@ -455,183 +459,183 @@
</sm-tab-header> </sm-tab-header>
<sm-tab-panels id="requests_to_cashier"> <sm-tab-panels id="requests_to_cashier">
<sm-panel> <sm-panel>
<div class="container-header"> <div class="container-header">
<sm-button id="fetch_deposits" onclick="show_deposit_request()"> <sm-button id="fetch_deposits" onclick="show_deposit_request()">
Load pending Load pending
</sm-button> </sm-button>
</div> </div>
<div id="pending_deposits_container" class="container"></div> <div id="pending_deposits_container" class="container"></div>
<div id="deposit_illustration" class="empty-state"> <div id="deposit_illustration" class="empty-state">
<svg viewBox="0 0 529.94 446.5"> <svg viewBox="0 0 529.94 446.5">
<defs> <defs>
<style> <style>
.a, .a,
.b, .b,
.c, .c,
.d { .d {
fill: none; fill: none;
stroke-linejoin: round; stroke-linejoin: round;
} }
.a { .a {
stroke-width: 9px; stroke-width: 9px;
} }
.b, .b,
.c { .c {
stroke-width: 5px; stroke-width: 5px;
} }
.c { .c {
stroke-dasharray: 11.94 11.94; stroke-dasharray: 11.94 11.94;
} }
.d { .d {
stroke-width: 3px; stroke-width: 3px;
} }
</style> </style>
</defs> </defs>
<title>Empty icon</title> <title>Empty icon</title>
<polyline class="a" <polyline class="a"
points="508.5 289 220.5 217 4.5 289 293.5 361 370.38 335.47 220.5 298 143.05 323.82 220.5 298 220.5 217 4.5 289 4.5 370 292.5 442 508.5 370 508.5 289 293.5 361 292.5 442" /> points="508.5 289 220.5 217 4.5 289 293.5 361 370.38 335.47 220.5 298 143.05 323.82 220.5 298 220.5 217 4.5 289 4.5 370 292.5 442 508.5 370 508.5 289 293.5 361 292.5 442" />
<path class="b" d="M947.54,629.34q0-3,.05-6" transform="translate(-703.5 -300.22)" /> <path class="b" d="M947.54,629.34q0-3,.05-6" transform="translate(-703.5 -300.22)" />
<path class="c" <path class="c"
d="M948.09,611.41c5.42-83.07,49.82-144.78,102.21-154.63,57.46-10.81,101.53-.27,88.07,42.61-7.82,24.88-50.89,36.71-71.95,5.86-26.87-39.37,12.95-108.88,71.46-131,17.38-6.57,37.33-14.37,53.89-30.53" d="M948.09,611.41c5.42-83.07,49.82-144.78,102.21-154.63,57.46-10.81,101.53-.27,88.07,42.61-7.82,24.88-50.89,36.71-71.95,5.86-26.87-39.37,12.95-108.88,71.46-131,17.38-6.57,37.33-14.37,53.89-30.53"
transform="translate(-703.5 -300.22)" /> transform="translate(-703.5 -300.22)" />
<path class="b" d="M1195.9,339.41c1.32-1.47,2.62-3,3.88-4.58" <path class="b" d="M1195.9,339.41c1.32-1.47,2.62-3,3.88-4.58"
transform="translate(-703.5 -300.22)" /> transform="translate(-703.5 -300.22)" />
<path class="d" <path class="d"
d="M1215,324.59c-2,3.62-6.21,5.12-9.34,3.36s-4-6.11-2-9.72,5.67-3.13,8.8-1.37S1217,321,1215,324.59Z" d="M1215,324.59c-2,3.62-6.21,5.12-9.34,3.36s-4-6.11-2-9.72,5.67-3.13,8.8-1.37S1217,321,1215,324.59Z"
transform="translate(-703.5 -300.22)" /> transform="translate(-703.5 -300.22)" />
<ellipse class="d" cx="1215.17" cy="310.95" rx="4.5" ry="4" <ellipse class="d" cx="1215.17" cy="310.95" rx="4.5" ry="4"
transform="translate(-354.28 918.17) rotate(-60.69)" /> transform="translate(-354.28 918.17) rotate(-60.69)" />
<path class="d" <path class="d"
d="M1231.68,321.5c1.44-1.68-3.48-3-6.84-5.84s-8.44-.9-9.87.78,1.31,2.43,4.67,5.3S1230.25,323.18,1231.68,321.5Z" d="M1231.68,321.5c1.44-1.68-3.48-3-6.84-5.84s-8.44-.9-9.87.78,1.31,2.43,4.67,5.3S1230.25,323.18,1231.68,321.5Z"
transform="translate(-703.5 -300.22)" /> transform="translate(-703.5 -300.22)" />
<path class="d" <path class="d"
d="M1197.61,302.37c.69-2.09,4.36,1.43,8.56,2.81s5.16,6.73,4.47,8.83-2.76.14-7-1.23S1196.93,304.47,1197.61,302.37Z" d="M1197.61,302.37c.69-2.09,4.36,1.43,8.56,2.81s5.16,6.73,4.47,8.83-2.76.14-7-1.23S1196.93,304.47,1197.61,302.37Z"
transform="translate(-703.5 -300.22)" /> transform="translate(-703.5 -300.22)" />
</svg> </svg>
<h4 class="light-text">No deposit requests.</h4> <h4 class="light-text">No deposit requests.</h4>
</div> </div>
</sm-panel> </sm-panel>
<sm-panel> <sm-panel>
<div class="container-header"> <div class="container-header">
<sm-button id="fetch_withdraws" onclick="show_withdraw_request()">Load pending</sm-button> <sm-button id="fetch_withdraws" onclick="show_withdraw_request()">Load pending</sm-button>
</div> </div>
<div id="pending_withdrawals_container" class="container"></div> <div id="pending_withdrawals_container" class="container"></div>
<div id="withdraw_illustration" class="empty-state"> <div id="withdraw_illustration" class="empty-state">
<svg viewBox="0 0 529.94 446.5"> <svg viewBox="0 0 529.94 446.5">
<defs> <defs>
<style> <style>
.a, .a,
.b, .b,
.c, .c,
.d { .d {
fill: none; fill: none;
stroke-linejoin: round; stroke-linejoin: round;
} }
.a { .a {
stroke-width: 9px; stroke-width: 9px;
} }
.b, .b,
.c { .c {
stroke-width: 5px; stroke-width: 5px;
} }
.c { .c {
stroke-dasharray: 11.94 11.94; stroke-dasharray: 11.94 11.94;
} }
.d { .d {
stroke-width: 3px; stroke-width: 3px;
} }
</style> </style>
</defs> </defs>
<title>Empty icon</title> <title>Empty icon</title>
<polyline class="a" <polyline class="a"
points="508.5 289 220.5 217 4.5 289 293.5 361 370.38 335.47 220.5 298 143.05 323.82 220.5 298 220.5 217 4.5 289 4.5 370 292.5 442 508.5 370 508.5 289 293.5 361 292.5 442" /> points="508.5 289 220.5 217 4.5 289 293.5 361 370.38 335.47 220.5 298 143.05 323.82 220.5 298 220.5 217 4.5 289 4.5 370 292.5 442 508.5 370 508.5 289 293.5 361 292.5 442" />
<path class="b" d="M947.54,629.34q0-3,.05-6" transform="translate(-703.5 -300.22)" /> <path class="b" d="M947.54,629.34q0-3,.05-6" transform="translate(-703.5 -300.22)" />
<path class="c" <path class="c"
d="M948.09,611.41c5.42-83.07,49.82-144.78,102.21-154.63,57.46-10.81,101.53-.27,88.07,42.61-7.82,24.88-50.89,36.71-71.95,5.86-26.87-39.37,12.95-108.88,71.46-131,17.38-6.57,37.33-14.37,53.89-30.53" d="M948.09,611.41c5.42-83.07,49.82-144.78,102.21-154.63,57.46-10.81,101.53-.27,88.07,42.61-7.82,24.88-50.89,36.71-71.95,5.86-26.87-39.37,12.95-108.88,71.46-131,17.38-6.57,37.33-14.37,53.89-30.53"
transform="translate(-703.5 -300.22)" /> transform="translate(-703.5 -300.22)" />
<path class="b" d="M1195.9,339.41c1.32-1.47,2.62-3,3.88-4.58" <path class="b" d="M1195.9,339.41c1.32-1.47,2.62-3,3.88-4.58"
transform="translate(-703.5 -300.22)" /> transform="translate(-703.5 -300.22)" />
<path class="d" <path class="d"
d="M1215,324.59c-2,3.62-6.21,5.12-9.34,3.36s-4-6.11-2-9.72,5.67-3.13,8.8-1.37S1217,321,1215,324.59Z" d="M1215,324.59c-2,3.62-6.21,5.12-9.34,3.36s-4-6.11-2-9.72,5.67-3.13,8.8-1.37S1217,321,1215,324.59Z"
transform="translate(-703.5 -300.22)" /> transform="translate(-703.5 -300.22)" />
<ellipse class="d" cx="1215.17" cy="310.95" rx="4.5" ry="4" <ellipse class="d" cx="1215.17" cy="310.95" rx="4.5" ry="4"
transform="translate(-354.28 918.17) rotate(-60.69)" /> transform="translate(-354.28 918.17) rotate(-60.69)" />
<path class="d" <path class="d"
d="M1231.68,321.5c1.44-1.68-3.48-3-6.84-5.84s-8.44-.9-9.87.78,1.31,2.43,4.67,5.3S1230.25,323.18,1231.68,321.5Z" d="M1231.68,321.5c1.44-1.68-3.48-3-6.84-5.84s-8.44-.9-9.87.78,1.31,2.43,4.67,5.3S1230.25,323.18,1231.68,321.5Z"
transform="translate(-703.5 -300.22)" /> transform="translate(-703.5 -300.22)" />
<path class="d" <path class="d"
d="M1197.61,302.37c.69-2.09,4.36,1.43,8.56,2.81s5.16,6.73,4.47,8.83-2.76.14-7-1.23S1196.93,304.47,1197.61,302.37Z" d="M1197.61,302.37c.69-2.09,4.36,1.43,8.56,2.81s5.16,6.73,4.47,8.83-2.76.14-7-1.23S1196.93,304.47,1197.61,302.37Z"
transform="translate(-703.5 -300.22)" /> transform="translate(-703.5 -300.22)" />
</svg> </svg>
<h4 class="light-text">No withdraw requests.</h4> <h4 class="light-text">No withdraw requests.</h4>
</div> </div>
</sm-panel> </sm-panel>
<sm-panel> <sm-panel>
<div class="container-header"> <div class="container-header">
<sm-button id="fetch_pay_requests" onclick="showPayRequests()"> <sm-button id="fetch_pay_requests" onclick="showPayRequests()">
Load pending Load pending
</sm-button> </sm-button>
</div> </div>
<div id="pay_requests_container" class="container"></div> <div id="pay_requests_container" class="container"></div>
<div id="pay_illustration" class="empty-state"> <div id="pay_illustration" class="empty-state">
<svg viewBox="0 0 529.94 446.5"> <svg viewBox="0 0 529.94 446.5">
<defs> <defs>
<style> <style>
.a, .a,
.b, .b,
.c, .c,
.d { .d {
fill: none; fill: none;
stroke-linejoin: round; stroke-linejoin: round;
} }
.a { .a {
stroke-width: 9px; stroke-width: 9px;
} }
.b, .b,
.c { .c {
stroke-width: 5px; stroke-width: 5px;
} }
.c { .c {
stroke-dasharray: 11.94 11.94; stroke-dasharray: 11.94 11.94;
} }
.d { .d {
stroke-width: 3px; stroke-width: 3px;
} }
</style> </style>
</defs> </defs>
<title>Empty icon</title> <title>Empty icon</title>
<polyline class="a" <polyline class="a"
points="508.5 289 220.5 217 4.5 289 293.5 361 370.38 335.47 220.5 298 143.05 323.82 220.5 298 220.5 217 4.5 289 4.5 370 292.5 442 508.5 370 508.5 289 293.5 361 292.5 442" /> points="508.5 289 220.5 217 4.5 289 293.5 361 370.38 335.47 220.5 298 143.05 323.82 220.5 298 220.5 217 4.5 289 4.5 370 292.5 442 508.5 370 508.5 289 293.5 361 292.5 442" />
<path class="b" d="M947.54,629.34q0-3,.05-6" transform="translate(-703.5 -300.22)" /> <path class="b" d="M947.54,629.34q0-3,.05-6" transform="translate(-703.5 -300.22)" />
<path class="c" <path class="c"
d="M948.09,611.41c5.42-83.07,49.82-144.78,102.21-154.63,57.46-10.81,101.53-.27,88.07,42.61-7.82,24.88-50.89,36.71-71.95,5.86-26.87-39.37,12.95-108.88,71.46-131,17.38-6.57,37.33-14.37,53.89-30.53" d="M948.09,611.41c5.42-83.07,49.82-144.78,102.21-154.63,57.46-10.81,101.53-.27,88.07,42.61-7.82,24.88-50.89,36.71-71.95,5.86-26.87-39.37,12.95-108.88,71.46-131,17.38-6.57,37.33-14.37,53.89-30.53"
transform="translate(-703.5 -300.22)" /> transform="translate(-703.5 -300.22)" />
<path class="b" d="M1195.9,339.41c1.32-1.47,2.62-3,3.88-4.58" <path class="b" d="M1195.9,339.41c1.32-1.47,2.62-3,3.88-4.58"
transform="translate(-703.5 -300.22)" /> transform="translate(-703.5 -300.22)" />
<path class="d" <path class="d"
d="M1215,324.59c-2,3.62-6.21,5.12-9.34,3.36s-4-6.11-2-9.72,5.67-3.13,8.8-1.37S1217,321,1215,324.59Z" d="M1215,324.59c-2,3.62-6.21,5.12-9.34,3.36s-4-6.11-2-9.72,5.67-3.13,8.8-1.37S1217,321,1215,324.59Z"
transform="translate(-703.5 -300.22)" /> transform="translate(-703.5 -300.22)" />
<ellipse class="d" cx="1215.17" cy="310.95" rx="4.5" ry="4" <ellipse class="d" cx="1215.17" cy="310.95" rx="4.5" ry="4"
transform="translate(-354.28 918.17) rotate(-60.69)" /> transform="translate(-354.28 918.17) rotate(-60.69)" />
<path class="d" <path class="d"
d="M1231.68,321.5c1.44-1.68-3.48-3-6.84-5.84s-8.44-.9-9.87.78,1.31,2.43,4.67,5.3S1230.25,323.18,1231.68,321.5Z" d="M1231.68,321.5c1.44-1.68-3.48-3-6.84-5.84s-8.44-.9-9.87.78,1.31,2.43,4.67,5.3S1230.25,323.18,1231.68,321.5Z"
transform="translate(-703.5 -300.22)" /> transform="translate(-703.5 -300.22)" />
<path class="d" <path class="d"
d="M1197.61,302.37c.69-2.09,4.36,1.43,8.56,2.81s5.16,6.73,4.47,8.83-2.76.14-7-1.23S1196.93,304.47,1197.61,302.37Z" d="M1197.61,302.37c.69-2.09,4.36,1.43,8.56,2.81s5.16,6.73,4.47,8.83-2.76.14-7-1.23S1196.93,304.47,1197.61,302.37Z"
transform="translate(-703.5 -300.22)" /> transform="translate(-703.5 -300.22)" />
</svg> </svg>
<h4 class="light-text">No pay requests.</h4> <h4 class="light-text">No pay requests.</h4>
</div> </div>
</sm-panel> </sm-panel>
@ -660,6 +664,10 @@
<h5>Rupee</h5> <h5>Rupee</h5>
<h3 class="token-balance">0</h3> <h3 class="token-balance">0</h3>
</div> </div>
<div class="balance">
<h5>Unconfirmed Rupee</h5>
<h3 class="uncnf-token-balance">0</h3>
</div>
<div class="balance"> <div class="balance">
<h5>FLO</h5> <h5>FLO</h5>
<h3 class="flo-balance">0</h3> <h3 class="flo-balance">0</h3>
@ -984,13 +992,13 @@
`; `;
if(enableActions) if(enableActions)
markup += ` markup += `
<div class="flex"> <div class="flex">
<button class="decline-request secondary-btn"> <button class="decline-request secondary-btn">
decline decline
</button> </button>
<button class="send-rupee"> <button class="send-rupee">
pay pay
</button> </button>
</div>` </div>`
card.innerHTML = markup card.innerHTML = markup
return card; return card;
@ -1506,7 +1514,7 @@
submitBtn = parent.querySelector("button[type='submit']"); submitBtn = parent.querySelector("button[type='submit']");
if (!submitBtn) return; if (!submitBtn) return;
if (formElement.hasAttribute('floId')) { if (formElement.hasAttribute('floId')) {
if (floCrypto.validateAddr(formElement.value)) { if (floCrypto.validateAddr(formElement.value.trim())) {
submitBtn.disabled = false; submitBtn.disabled = false;
} else { } else {
submitBtn.disabled = true; submitBtn.disabled = true;
@ -11122,12 +11130,18 @@
return false; return false;
} }
} }
function delay(t, v) {
return new Promise(function(resolve) {
setTimeout(resolve.bind(null, v), t);
});
}
</script> </script>
<script> <script>
const token_app = { const token_app = {
master_configurations: {}, master_configurations: {},
//masterFLOAddress: 'FD5hK9ryBogJ5AcSvCy1tW5as8jRTkMLky',
actions: {}, actions: {},
blocked_flo_ids: [], blocked_flo_ids: [],
}; };
@ -11135,33 +11149,29 @@
token_app.actions = { token_app.actions = {
parse_flo_comments: async function () { parse_flo_comments: async function () {
const num=3;
text = `masterFLOAddress=FD5hK9ryBogJ5AcSvCy1tW5as8jRTkMLky text = `masterFLOAddress=FD5hK9ryBogJ5AcSvCy1tW5as8jRTkMLky
#!#CURRENCY=INR #!#CURRENCY=INR
#!#TYPE_DEPOSITS=CASH_DEPOSITS_TEST2 #!#TYPE_DEPOSITS=CASH_DEPOSITS_TEST${num}
#!#TYPE_WITHDRAWS=CASH_WITHDRAWS_TEST2 #!#TYPE_WITHDRAWS=CASH_WITHDRAWS_TEST${num}
#!#TYPE_MSGES=USER_MESSAGES_TEST2 #!#TYPE_MSGES=USER_MESSAGES_TEST${num}
#!#TYPE_PROCESSED_DEPOSITS=PROCESSED_DEPOSITS_TEST2 #!#TYPE_PROCESSED_DEPOSITS=PROCESSED_DEPOSITS_TEST${num}
#!#TYPE_PROCESSED_WITHDRAWS=PROCESSED_WITHDRAWS_TEST2 #!#TYPE_PROCESSED_WITHDRAWS=PROCESSED_WITHDRAWS_TEST${num}
#!#TYPE_FILE_DEPOSITS_COMPLAINT=DEPOSITS_COMPLAINT_TEST2 #!#TYPE_FILE_DEPOSITS_COMPLAINT=DEPOSITS_COMPLAINT_TEST${num}
#!#TYPE_PROCESSED_DEPOSITS_COMPLAINT=PROCESSED_DEPOSITS_COMPLAINT_TEST2 #!#TYPE_PROCESSED_DEPOSITS_COMPLAINT=PROCESSED_DEPOSITS_COMPLAINT_TEST${num}
#!#TYPE_FILE_WITHDRAWS_COMPLAINT=WITHDRAWS_COMPLAINT_TEST2 #!#TYPE_FILE_WITHDRAWS_COMPLAINT=WITHDRAWS_COMPLAINT_TEST${num}
#!#TYPE_PROCESSED_WITHDRAWS_COMPLAINT=PROCESSED_WITHDRAWS_COMPLAINT_TEST2 #!#TYPE_PROCESSED_WITHDRAWS_COMPLAINT=PROCESSED_WITHDRAWS_COMPLAINT_TEST${num}
#!#TYPE_PAY_THROUGH_CASHIER=PAY_THRU_CASHIER_TEST2 #!#TYPE_PAY_THROUGH_CASHIER=PAY_THRU_CASHIER_TEST${num}
#!#TYPE_FILE_PAY_THROUGH_CASHIER_COMPLAINT=PAY_THRU_CASHIER_COMPLAINT_TEST2 #!#TYPE_FILE_PAY_THROUGH_CASHIER_COMPLAINT=PAY_THRU_CASHIER_COMPLAINT_TEST${num}
#!#TYPE_PROCESSED_PAY_THROUGH_CASHIER=PROCESSED_PAY_THROUGH_CASHIER_TEST2 #!#TYPE_PROCESSED_PAY_THROUGH_CASHIER=PROCESSED_PAY_THROUGH_CASHIER_TEST${num}
#!#TYPE_PROCESSED_PAY_THROUGH_CASHIER_COMPLAINT=PROCESSED_PAY_THROUGH_CASHIER_COMPLAINT_TEST2 #!#TYPE_PROCESSED_PAY_THROUGH_CASHIER_COMPLAINT=PROCESSED_PAY_THROUGH_CASHIER_COMPLAINT_TEST${num}
#!#TYPE_REQUEST_PAYMENT_DECLINED=REQUEST_PAYMENT_DECLINED_TEST2 #!#TYPE_REQUEST_PAYMENT=REQUEST_PAYMENT_TEST${num}
#!#TYPE_REQUEST_PAYMENT_APPROVED=REQUEST_PAYMENT_APPROVED_TEST2 #!#TYPE_REQUEST_PAYMENT_DECLINED=REQUEST_PAYMENT_DECLINED_TEST${num}
#!#TYPE_REQUEST_PAYMENT_APPROVED=REQUEST_PAYMENT_APPROVED_TEST${num}
#!#vendors=FGtPEBu2NFFYkqFrA9NDBJJLpVhyuPubDj, #!#vendors=FGtPEBu2NFFYkqFrA9NDBJJLpVhyuPubDj,
#!#helplineFloId=F9MAyvT5b9aSfsuukAungrbt1L5fgmJmuK #!#helplineFloId=F9MAyvT5b9aSfsuukAungrbt1L5fgmJmuK
#!#cashiers= #!#cashiers=
{ {
"FByrY4vc1NRfbkqAqABtUyhhNzMZsKUjqr": {
"upi_id": "7004780931@upi"
},
"FPFeL5PXzW9bGosUjQYCxTHSMHidnygvvd": {
"upi_id": "7744023898@paytm"
},
"FCja6sLv58e3RMy41T5AmWyvXEWesqBCkX": { "FCja6sLv58e3RMy41T5AmWyvXEWesqBCkX": {
"upi_id": "8507742774@ybl" "upi_id": "8507742774@ybl"
}, },
@ -11181,9 +11191,6 @@
"upi_id": "krishraj1012-2@okicici" "upi_id": "krishraj1012-2@okicici"
} }
}` }`
/*
*/
text = removeWhiteSpaces(text); text = removeWhiteSpaces(text);
return text; return text;
const master_data = await ajaxGet( const master_data = await ajaxGet(
@ -11420,7 +11427,7 @@
arg1: token_app.master_configurations.TYPE_MSGES, arg1: token_app.master_configurations.TYPE_MSGES,
arg2: {receiverID: myFloID} arg2: {receiverID: myFloID}
} }
promises.push(p4); promises.push(p4);
await Promise.all(promises.map(prom => prom.func.call(floCloudAPI,prom.arg1, prom.arg2))); await Promise.all(promises.map(prom => prom.func.call(floCloudAPI,prom.arg1, prom.arg2)));
@ -11443,6 +11450,9 @@
floCloudAPI.resetObjectData(token_app, floGlobals.application, { floCloudAPI.resetObjectData(token_app, floGlobals.application, {
receiverID: floGlobals.adminID receiverID: floGlobals.adminID
}); });
floGlobals.appObjects["unconfirmed_rupee_deposits"] = {};
floCloudAPI.resetObjectData("unconfirmed_rupee_deposits");
} }
async function show_deposit_request() { async function show_deposit_request() {
@ -11470,7 +11480,7 @@
let cash_deposits = await compactIDB.readAllData('deposits_flo_txids'); let cash_deposits = await compactIDB.readAllData('deposits_flo_txids');
let cash_deposits_upi_txid_list = Object.values(cash_deposits).map(m => m.upi_txid); let cash_deposits_upi_txid_list = Object.values(cash_deposits).map(m => m.user_upi_txid);
const general_msg = floDapps.getNextGeneralData(token_app.master_configurations.TYPE_DEPOSITS, "0"); const general_msg = floDapps.getNextGeneralData(token_app.master_configurations.TYPE_DEPOSITS, "0");
@ -11558,15 +11568,40 @@
notify(`Transfer unsuccessfull.`); notify(`Transfer unsuccessfull.`);
return false; return false;
} }
// TODO: check https://ranchimallflo.duckdns.org/api/v1.0/getTransactionDetails/${flo_txid}
// and then continue
const input_data = { const input_data = {
receiver_flo_id, receiver_flo_id,
flo_txid, flo_txid,
user_upi_txid, user_upi_txid,
"tokens_transferred": amount_of_tokens_to_transfer,
"datetime": +new Date() "datetime": +new Date()
} }
// TODO: check https://ranchimallflo.duckdns.org/api/v1.0/getTransactionDetails/${flo_txid}
// and then continue
let n=1;
(async function validateDepositTxidInBlockchain() {
notify('Txid '+flo_txid+' validation in process. Please do not close the app until directed.');
await delay(60000);
let validate_txid = await ajaxGet(`https://ranchimallflo.duckdns.org/api/v1.0/getTransactionDetails/${flo_txid}`);
if(typeof validate_txid=="object" && validate_txid.result=="ok") {
// tx registered. Do nothing
} else if(n<=5) {
validateDepositTxidInBlockchain();
n++;
} else {
floGlobals.appObjects["unconfirmed_rupee_deposits"][flo_txid] = input_data;
let receiverID = floGlobals.adminID;
floCloudAPI.updateObjectData("unconfirmed_rupee_deposits", { receiverID });
notify('Txid '+flo_txid+' added in Unconfirmed Rupee Deposits.', 'error');
}
})();
compactIDB.addData('deposits_flo_txids', input_data, "flo_txid"); compactIDB.addData('deposits_flo_txids', input_data, "flo_txid");
// Add data into personal ledger as well // Add data into personal ledger as well
@ -11640,6 +11675,7 @@
notify(error, 'error') notify(error, 'error')
} }
} }
async function transferTokensManually() { async function transferTokensManually() {
try { try {
const send_tokens_btn = document.getElementById('send_tokens_btn'); const send_tokens_btn = document.getElementById('send_tokens_btn');
@ -11686,7 +11722,7 @@
hidePopup() hidePopup()
return false; return false;
} else { } else {
notify(`Transaction successful: ${flo_txid}.`, 'success', '', true); notify(`Transaction successful: <span class="breakable">${flo_txid}</span>.`, 'success', '', true);
if (payingRequested) { if (payingRequested) {
payment_request_status(currentPaymentRequest.requestId, 'APPROVED') payment_request_status(currentPaymentRequest.requestId, 'APPROVED')
showPayRequests() showPayRequests()
@ -11711,19 +11747,22 @@
const get_user_rupee_balance = await ajaxGet( const get_user_rupee_balance = await ajaxGet(
'https://ranchimallflo.duckdns.org/api/v1.0/getFloAddressBalance?token=rupee&floAddress=' + 'https://ranchimallflo.duckdns.org/api/v1.0/getFloAddressBalance?token=rupee&floAddress=' +
myFloID) myFloID)
const get_user_flo_balance = await ajaxGet(` const get_user_unconfirmed_rupee_balance = await get_unconfirmed_balance(myFloID);
https://ranchimallflo.duckdns.org/api/v1.0/getFloAddressBalance?floAddress=${myFloID}`)
const get_user_flo_balance = await floBlockchainAPI.getBalance(myFloID)
console.log(get_user_flo_balance) console.log(get_user_flo_balance)
if (typeof get_user_rupee_balance === "object" && get_user_rupee_balance.balance >= 0) { if (typeof get_user_rupee_balance === "object" && get_user_rupee_balance.balance >= 0) {
if (get_user_rupee_balance.balance === null) if (get_user_rupee_balance.balance === null)
get_user_rupee_balance.balance = 0; get_user_rupee_balance.balance = 0;
document.querySelectorAll('.token-balance').forEach(bal => bal.textContent = get_user_rupee_balance.balance); document.querySelectorAll('.token-balance').forEach(bal => bal.textContent = get_user_rupee_balance.balance);
} }
/*if (typeof get_user_flo_balance === "object" && get_user_flo_balance.balance >= 0) { if(typeof get_user_unconfirmed_rupee_balance=="number" && !isNaN(get_user_unconfirmed_rupee_balance)) {
if (get_user_flo_balance.balance === null) document.querySelectorAll('.uncnf-token-balance').forEach(elem => elem.textContent = get_user_unconfirmed_rupee_balance);
get_user_flo_balance.balance = 0; }
document.getElementById('flo_balance').textContent = get_user_flo_balance.balance; if (typeof get_user_flo_balance !== "number" || isNaN(get_user_flo_balance)) {
}*/ get_user_flo_balance = 0;
}
document.querySelectorAll('.flo-balance').forEach(elem => elem.textContent = get_user_flo_balance);
} }
if (refreshButton) { if (refreshButton) {
notify('Balance Updated') notify('Balance Updated')
@ -11845,6 +11884,32 @@
throw new Error(error) throw new Error(error)
} }
} }
async function accounting(date='') {
try {
await floCloudAPI.requestGeneralData(token_app.master_configurations
.TYPE_PROCESSED_DEPOSITS, {
receiverID: myFloID
});
const cash_deposits = floDapps.getNextGeneralData(token_app.master_configurations
.TYPE_PROCESSED_DEPOSITS, "0");
let total = 0;
for(t in cash_deposits) {
let data = cash_deposits[t].message;
if(typeof date !=='number'
|| (new Date(data.datetime*1000).getDate() !== new Date(date).getDate())) continue;
let tokens_transferred = Number(data.tokens_transferred);
if(isNaN(tokens_transferred)) tokens_transferred=0;
total += tokens_transferred;
}
console.log(total);
} catch(e) {
console.log(e);
}
}
</script> </script>
<!-- User functions --> <!-- User functions -->
@ -12043,7 +12108,7 @@
frag.append(render.depositActivity(usr_deposits.vectorClock, upi_txid, deposit_amount)) frag.append(render.depositActivity(usr_deposits.vectorClock, upi_txid, deposit_amount))
} }
depositActivityContainer.innerHTML = ``; depositActivityContainer.innerHTML = ``;
depositActivityContainer.append(frag) depositActivityContainer.append(frag)
@ -12056,7 +12121,7 @@
frag.append(render.withdrawActivity(usr_withdraws.vectorClock, token_txid, withdrawer_upi, frag.append(render.withdrawActivity(usr_withdraws.vectorClock, token_txid, withdrawer_upi,
withdraw_amount)) withdraw_amount))
} }
withdrawActivityContainer.innerHTML = ``; withdrawActivityContainer.innerHTML = ``;
withdrawActivityContainer.append(frag) withdrawActivityContainer.append(frag)
for (cashier_message of pay_thru_cashier_msg) { for (cashier_message of pay_thru_cashier_msg) {
@ -12070,14 +12135,14 @@
amount)) amount))
} }
payCashierActivityContainer.innerHTML = ``; payCashierActivityContainer.innerHTML = ``;
payCashierActivityContainer.append(frag) payCashierActivityContainer.append(frag)
for (msg of user_msg) { for (msg of user_msg) {
frag.append(render.cashierMessage(msg)) frag.append(render.cashierMessage(msg))
} }
cashierMessageContainer.innerHTML = ``; cashierMessageContainer.innerHTML = ``;
cashierMessageContainer.append(frag) cashierMessageContainer.append(frag)
} catch (e) { } catch (e) {
notify(e, 'error'); notify(e, 'error');
@ -12170,14 +12235,14 @@
declined_reqs_list = floDapps.getNextGeneralData(token_app.master_configurations declined_reqs_list = floDapps.getNextGeneralData(token_app.master_configurations
.TYPE_REQUEST_PAYMENT_DECLINED, "0").reverse(), .TYPE_REQUEST_PAYMENT_DECLINED, "0").reverse(),
approved_reqs_list = floDapps.getNextGeneralData(token_app.master_configurations approved_reqs_list = floDapps.getNextGeneralData(token_app.master_configurations
.TYPE_REQUEST_PAYMENT_APPROVED, "0").reverse(); .TYPE_REQUEST_PAYMENT_APPROVED, "0").reverse();
console.log(general_msg);
console.log(approved_reqs_list);
console.log(declined_reqs_list);
let processed_payments_requests = approved_reqs_list.map(m => m.message).concat(declined_reqs_list console.log(general_msg);
.map(m => m.message)); console.log(approved_reqs_list);
console.log(declined_reqs_list);
let processed_payments_requests = approved_reqs_list.map(m => m.message.pay_req_id).concat(declined_reqs_list
.map(m => m.message.pay_req_id));
let pendingPaymentRequestContainer = document.getElementById("pending_payment_request_container"), let pendingPaymentRequestContainer = document.getElementById("pending_payment_request_container"),
approvedPaymentRequestContainer = document.getElementById("approved_payment_request_container"), approvedPaymentRequestContainer = document.getElementById("approved_payment_request_container"),
@ -12186,7 +12251,7 @@
pendingPaymentRequestContainer.innerHTML = ``; pendingPaymentRequestContainer.innerHTML = ``;
approvedPaymentRequestContainer.innerHTML = ``; approvedPaymentRequestContainer.innerHTML = ``;
declinedPaymentRequestContainer.innerHTML = ``; declinedPaymentRequestContainer.innerHTML = ``;
for (const m of general_msg) { for (const m of general_msg) {
let { let {
sender_flo_id, sender_flo_id,
@ -12196,6 +12261,7 @@
pay_req_id pay_req_id
} = m.message; } = m.message;
if (processed_payments_requests.includes(pay_req_id || m.message)) continue; if (processed_payments_requests.includes(pay_req_id || m.message)) continue;
console.log(sender_flo_id, amount, datetime, pay_req_id);
if (typeof sender_flo_id !== "string") continue; if (typeof sender_flo_id !== "string") continue;
frag.append(render.paymentRequest(datetime, sender_flo_id, amount, pay_req_id, true)) frag.append(render.paymentRequest(datetime, sender_flo_id, amount, pay_req_id, true))
} }
@ -12231,10 +12297,10 @@
} }
} }
function payment_request_status(req_id = '', status = '') { function payment_request_status(req = '', status = '') {
try { try {
if (req_id.lenght < 1) return false; if (typeof req !== 'object') return false;
if (status === 'DECLINED') { if (status === 'DECLINED') {
status = token_app.master_configurations.TYPE_REQUEST_PAYMENT_DECLINED; status = token_app.master_configurations.TYPE_REQUEST_PAYMENT_DECLINED;
@ -12242,11 +12308,11 @@
status = token_app.master_configurations.TYPE_REQUEST_PAYMENT_APPROVED; status = token_app.master_configurations.TYPE_REQUEST_PAYMENT_APPROVED;
} else return; } else return;
floCloudAPI.sendGeneralData(req_id, status, { floCloudAPI.sendGeneralData(req, status, {
receiverID: myFloID receiverID: myFloID
}); });
console.info(req_id + ' added to declined requests list.'); console.log(req);
return true; return true;
@ -12254,6 +12320,40 @@
console.log(e); console.log(e);
} }
} }
async function get_unconfirmed_balance(flo_id='') {
try {
let api = `https://ranchimallflo.duckdns.org/api/v1.0/getFloAddressTransactions?floAddress=${flo_id}`;
let token_balance = await ajaxGet(`https://ranchimallflo.duckdns.org/api/v1.0/getFloAddressBalance?token=rupee&floAddress=${flo_id}`);
token_balance = token_balance.balance;
let tokens_transfers_tx_list = await ajaxGet(api);
tokens_transfers_tx_list = Object.keys(tokens_transfers_tx_list.transactions);
let receiverID = floGlobals.adminID;
let senderIDs = Object.keys(token_app.master_configurations.cashiers);
await floCloudAPI.requestObjectData("unconfirmed_rupee_deposits", { receiverID, senderIDs });
let unconfirmed_tx_list = Object.keys(floGlobals.appObjects["unconfirmed_rupee_deposits"]);
//console.log(unconfirmed_tx_list);
//console.log(tokens_transfers_tx_list);
//console.log(token_balance);
let unconfirmed_balance=0;
for(ut of unconfirmed_tx_list) {
if(tokens_transfers_tx_list.includes(ut)) {
// remove this item from unconfirmed_tx_list
if(delete floGlobals.appObjects["unconfirmed_rupee_deposits"][ut])
floCloudAPI.updateObjectData("unconfirmed_rupee_deposits", { receiverID });
} else {
unconfirmed_balance += Number(floGlobals.appObjects["unconfirmed_rupee_deposits"][ut]["tokens_transferred"])
}
}
console.log(token_balance, unconfirmed_balance);
return unconfirmed_balance;
} catch(error) {
notify('Failed to get rupee balance.', 'error')
throw new Error(error);
}
}
</script> </script>
<!-- Helpline --> <!-- Helpline -->
@ -12597,4 +12697,4 @@
</script> </script>
</body> </body>
</html> </html>