From 84cadc6e6fb3af0e1ef47efa93ed73f53ec7a908 Mon Sep 17 00:00:00 2001 From: tim Date: Fri, 6 Sep 2024 19:42:33 -0400 Subject: [PATCH] native coin handling --- media/ethereum-eth-logo-diamond-purple-64.png | Bin 0 -> 1196 bytes src/blockchain/wallet.js | 3 +- src/common.js | 1 + src/components/NativeRow.vue | 46 ++ src/components/NativeWrap.vue | 60 +++ src/components/Status.vue | 13 +- src/components/TokenRow.vue | 2 +- src/components/Vault.vue | 73 +-- src/components/Withdraw.vue | 3 +- src/components/WithdrawNative.vue | 61 +++ src/misc.js | 2 +- src/styles/style.scss | 2 +- yarn.lock | 459 +++++++++--------- 13 files changed, 460 insertions(+), 265 deletions(-) create mode 100644 media/ethereum-eth-logo-diamond-purple-64.png create mode 100644 src/components/NativeRow.vue create mode 100644 src/components/NativeWrap.vue create mode 100644 src/components/WithdrawNative.vue diff --git a/media/ethereum-eth-logo-diamond-purple-64.png b/media/ethereum-eth-logo-diamond-purple-64.png new file mode 100644 index 0000000000000000000000000000000000000000..967a2d3188c2a96dc5a42d55655162c17bee0ba9 GIT binary patch literal 1196 zcmV;d1XKHoP)EX>4Tx04R}tkv&MmKpe$iTeT|n11uuqkfAzR5EXIMDionYs1;guFuC+YXws0R zxHt-~1qVMCs}3&Cx;nTDg5U>;vxAeOimEM7-bHzq_qjhumy$IZ;1h^vm~L3a>%>!= zmd<&fILr!?LVQjCfeW_cQvY4A6HAbgsI+)%S7w0Hmm^#0_w8 z2#n+@d(GqB?ajUYd#2vs4;$8Ugha=NDgXcg24YJ`L;#}zlK_G;C%T*f000SaNLh0L z01ejw01ejxLMWSf00007bV*G`2j~d~78WMRhT#eT00O8%nms30S0hkTS5^ zDFZ0b=PHG~2zDX+F)7ep5g*HhTmoInehdmGo&Y74{fqNU000t@w8i6&T$A#Ls@TR~J!A^iJ`!1r#38)L385jzJKe%^zx}=pk!(`jl z0GkodVCIho+t;imP$%9;ct|vrM-SA$&}1qK^fAJH2(S?mQVPKYT%2DTs%@0OymFyG zr&$P~K8s@rsEgmfzN_dZKxqV(0lvb~M`4Onm{iuukHQ!lFa%(PlNx|ABE$d+;iwX5 zIspy`TgvFN9}D%TqWst-K9s^>Co28HWRe14^n?As$vOriOK{Y@zhP2ikW4{!HQ@H8s%olcfpfvzw_m2tOrw4 z5Oeqvl>iD8Vo#npO5g$U+3U`hz#9r?5ZRyayaA!5z%_Jb+XZ|~;G8(;ZIJWJTqxka zZ(t{&%>;?d7NHVQ!|`_vnC*Ab4f-}rRWp>*RU4}b(*Ha?@$mwO4sDZ#W@haG0000< KMNUMnLSTaFt{egY literal 0 HcmV?d00001 diff --git a/src/blockchain/wallet.js b/src/blockchain/wallet.js index 970148d..f7a1f13 100644 --- a/src/blockchain/wallet.js +++ b/src/blockchain/wallet.js @@ -61,8 +61,7 @@ export function updateAccounts(chainId, provider) { function changeAccounts(chainId, accounts) { // this is a notification from the wallet that the user selected a different blockchain. that chain may or may not - // be supported. we store this value in walletStore.chainId, which may or may not be the same as - // the application's useStore().chainId + // be supported. console.log('changeAccounts', chainId, accounts) const store = useStore() if (chainId === store.chainId && accounts.length) { diff --git a/src/common.js b/src/common.js index 47f9a29..575be02 100644 --- a/src/common.js +++ b/src/common.js @@ -124,6 +124,7 @@ export class AbiURLCache extends AsyncURLCache { const files = { // If a contract is in a file different than its name, put the exception here // 'IVaultImpl' : 'IVault', // for example + 'IERC20Metadata' : 'interfaces/IERC20Metadata', } export function abiPath(name) { diff --git a/src/components/NativeRow.vue b/src/components/NativeRow.vue new file mode 100644 index 0000000..b4160a7 --- /dev/null +++ b/src/components/NativeRow.vue @@ -0,0 +1,46 @@ + + + + + + diff --git a/src/components/NativeWrap.vue b/src/components/NativeWrap.vue new file mode 100644 index 0000000..aeb2045 --- /dev/null +++ b/src/components/NativeWrap.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/src/components/Status.vue b/src/components/Status.vue index 54f1ce3..1edb99f 100644 --- a/src/components/Status.vue +++ b/src/components/Status.vue @@ -117,8 +117,8 @@
-
{{ describeTrancheTime(item, true, t) }}
-
{{ describeTrancheTime(item, false, t) }}
+
{{ describeTrancheTime(item, i, true) }}
+
{{ describeTrancheTime(item, i, false) }}
market order
@@ -274,16 +274,17 @@ const orders = computed(()=>{ return result }) -function describeTrancheTime(st, isStart, t) { +function describeTrancheTime(st, trancheIndex, isStart) { + const t = st.order.tranches[trancheIndex] + const ts = st.trancheStatus[trancheIndex] let result = '' if( t.minIsBarrier || t.maxIsBarrier ) return 'barrier' const now = Math.round(Date.now()/1000) if( isStart && t.startTime > 0 ) { const start = t.startTimeIsRelative ? st.startTime + t.startTime : t.startTime - result += now < start ? 'Activates ' : - st.trancheStatus.activationTime < now ? 'Rate Limited ' : 'Activated ' - result += timestampString(st.trancheStatus.activationTime) + ' ' + result += now < start ? ts.activationTime < now ? 'Rate Limited ' : 'Activates ' : 'Activated ' + result += timestampString(ts.activationTime) + ' ' } if( !isStart && t.endTime < 4294967295 ) { const ended = t.endTimeIsRelative ? st.startTime + t.endTime : t.endTime diff --git a/src/components/TokenRow.vue b/src/components/TokenRow.vue index bded3fc..a475760 100644 --- a/src/components/TokenRow.vue +++ b/src/components/TokenRow.vue @@ -1,7 +1,7 @@