@@ -78,32 +74,14 @@ - - - - - - - - - Profile - - My FLO ID - - - - Add password lock - - Adding password lock allows to authenticate transactions with custom password instead of - private key. - - Add password - - Log out - - + + + + + + @@ -123,8 +101,12 @@ Not registered? click here! - - FLO/INR rate + + + + + FLO/INR @@ -275,7 +257,7 @@ Dashboard - + @@ -306,7 +288,7 @@ Market - + @@ -317,6 +299,35 @@ Wallet + + + + + + + + + Profile + + + + My FLO ID + + + + + Add password lock + + Adding password lock allows to authenticate transactions with custom password instead of + private key. + + + Add password + + Log out + + @@ -1374,7 +1385,7 @@ selectedOrders.clear() } catch (err) { - notify(err, 'error') + notify(err.data, 'error') } } }) @@ -1448,12 +1459,11 @@ }) } catch (err) { - notify(err, 'error') + notify(err.data, 'error') } } else { try { - // const marketTransactions = await getTransactionList() - const marketTransactions = myTransactions + const marketTransactions = await getTransactionList() marketTransactions.forEach(transaction => { const { seller, buyer, quantity, unitValue, tx_time } = transaction const transactionDetails = { @@ -1468,7 +1478,7 @@ const marketTransactionList = getRef('market_transaction_list_template').content.cloneNode(true) } catch (err) { - notify(err, 'error') + notify(err.data, 'error') } } getRef('market_orders_list').append(frag) @@ -1479,39 +1489,6 @@ } }) - const openDropdowns = new Set() - function toggleDropdown(id) { - const animOptions = { - duration: 300, - fill: 'forwards', - easing: 'ease' - } - if (!openDropdowns.has(id)) { - getRef(id).querySelector('.dropdown').classList.remove('hide-completely') - getRef(id).querySelector('.dropdown').animate(slideInDown, animOptions) - .onfinish = () => { - getRef(id).classList.toggle('open') - openDropdowns.add(id) - document.addEventListener('click', handleFocusOut) - } - } else { - getRef(id).querySelector('.dropdown').animate(slideOutUp, animOptions) - .onfinish = () => { - getRef(id).querySelector('.dropdown').classList.add('hide-completely') - getRef(id).classList.toggle('open') - openDropdowns.delete(id) - } - } - } - - function handleFocusOut(e) { - if (!e.target.closest('.dropdown-wrapper')) { - openDropdowns.forEach(id => toggleDropdown(id)) - openDropdowns.clear() - } else { - document.addEventListener('click', handleFocusOut) - } - } document.addEventListener('popupopened', e => { switch (e.target.id) { @@ -1625,118 +1602,6 @@ getRef(containerId).append(card) } - const myBuyOrders = [ - { - id: 'dfs5g16sdg1', - time_placed: generateRandomDate(), - quantity: 14.5, - maxPrice: 1.36, - }, - { - id: 'f4gd1d56fg1', - time_placed: generateRandomDate(), - quantity: 78.3, - maxPrice: 1.26, - }, - { - id: 's4dg5s4d1g98', - time_placed: generateRandomDate(), - quantity: 14.5, - maxPrice: 1.28, - }, - ] - const mySellOrders = [ - { - id: 'sd8g45g419s6', - time_placed: generateRandomDate(), - quantity: 15, - minPrice: 1.16, - }, - { - id: 's59d1g9ws18d', - time_placed: generateRandomDate(), - quantity: 8.3, - minPrice: 1.86, - }, - { - id: 'w899e1g4d1g98', - time_placed: generateRandomDate(), - quantity: 18.5, - minPrice: 1.64, - }, - ] - - const myTransactions = [ - { - id: 'sd8g45g419s6', - tx_time: generateRandomDate(), - quantity: 15, - unitValue: 1.16, - buyer: 'w8eg4w8eg4w98werg9' - }, - { - id: 's59d1g9ws18d', - tx_time: generateRandomDate(), - quantity: 8.3, - unitValue: 1.86, - buyer: 'w8eg4w8eg4w98werg9' - }, - { - id: 'w899e1g4d1g98', - tx_time: generateRandomDate(), - quantity: 18.5, - unitValue: 1.64, - buyer: 'w8eg4w8eg4w98werg9' - }, - ] - - const market = { - buyOrders: [ - { - floID: 'dfs5g16sdg1', - time_placed: generateRandomDate(), - quantity: 14.5, - maxPrice: 1.36, - }, - { - floID: 'f4gd1d56fg1', - time_placed: generateRandomDate(), - quantity: 78.3, - maxPrice: 1.26, - }, - { - floID: 's4dg5s4d1g98', - time_placed: generateRandomDate(), - quantity: 14.5, - maxPrice: 1.28, - }, - ], - sellOrders: [ - { - floID: 'sd8g45g419s6', - time_placed: generateRandomDate(), - quantity: 15, - minPrice: 1.16, - }, - { - floID: 's59d1g9ws18d', - time_placed: generateRandomDate(), - quantity: 8.3, - minPrice: 1.86, - }, - { - floID: 'w899e1g4d1g98', - time_placed: generateRandomDate(), - quantity: 18.5, - minPrice: 1.64, - }, - ] - } - - function generateRandomDate() { - return new Date() - Math.floor(Math.random() * 10000000000); - } - const balance = {} let accountDetails = {} @@ -1825,7 +1690,7 @@ console.log(result); proxy.secret = tmpKey.privKey; account(); - }).catch(error => console.error(error)); + }).catch(error => notify(error.data, 'error')); } };