diff --git a/resources/images/tokens/1ST.png b/resources/images/tokens/1ST.png new file mode 100644 index 0000000000..e8c8f99b17 Binary files /dev/null and b/resources/images/tokens/1ST.png differ diff --git a/resources/images/tokens/1ST@2x.png b/resources/images/tokens/1ST@2x.png new file mode 100644 index 0000000000..e3c16076e5 Binary files /dev/null and b/resources/images/tokens/1ST@2x.png differ diff --git a/resources/images/tokens/1ST@3x.png b/resources/images/tokens/1ST@3x.png new file mode 100644 index 0000000000..9c8d270c3a Binary files /dev/null and b/resources/images/tokens/1ST@3x.png differ diff --git a/resources/images/tokens/AE.png b/resources/images/tokens/AE.png new file mode 100644 index 0000000000..5096fd0f04 Binary files /dev/null and b/resources/images/tokens/AE.png differ diff --git a/resources/images/tokens/AE@2x.png b/resources/images/tokens/AE@2x.png new file mode 100644 index 0000000000..3ba8f5b042 Binary files /dev/null and b/resources/images/tokens/AE@2x.png differ diff --git a/resources/images/tokens/AE@3x.png b/resources/images/tokens/AE@3x.png new file mode 100644 index 0000000000..711c191422 Binary files /dev/null and b/resources/images/tokens/AE@3x.png differ diff --git a/resources/images/tokens/AMB.png b/resources/images/tokens/AMB.png new file mode 100644 index 0000000000..0587220e58 Binary files /dev/null and b/resources/images/tokens/AMB.png differ diff --git a/resources/images/tokens/AMB@2x.png b/resources/images/tokens/AMB@2x.png new file mode 100644 index 0000000000..d17ec8f6a0 Binary files /dev/null and b/resources/images/tokens/AMB@2x.png differ diff --git a/resources/images/tokens/AMB@3x.png b/resources/images/tokens/AMB@3x.png new file mode 100644 index 0000000000..08cb29a6df Binary files /dev/null and b/resources/images/tokens/AMB@3x.png differ diff --git a/resources/images/tokens/ANT.png b/resources/images/tokens/ANT.png new file mode 100644 index 0000000000..74ed7fb00d Binary files /dev/null and b/resources/images/tokens/ANT.png differ diff --git a/resources/images/tokens/ANT@2x.png b/resources/images/tokens/ANT@2x.png new file mode 100644 index 0000000000..10b2f6f32a Binary files /dev/null and b/resources/images/tokens/ANT@2x.png differ diff --git a/resources/images/tokens/ANT@3x.png b/resources/images/tokens/ANT@3x.png new file mode 100644 index 0000000000..9f52882396 Binary files /dev/null and b/resources/images/tokens/ANT@3x.png differ diff --git a/resources/images/tokens/AST.png b/resources/images/tokens/AST.png new file mode 100644 index 0000000000..33bcb9dda2 Binary files /dev/null and b/resources/images/tokens/AST.png differ diff --git a/resources/images/tokens/AST@2x.png b/resources/images/tokens/AST@2x.png new file mode 100644 index 0000000000..607622d95f Binary files /dev/null and b/resources/images/tokens/AST@2x.png differ diff --git a/resources/images/tokens/AST@3x.png b/resources/images/tokens/AST@3x.png new file mode 100644 index 0000000000..ea19fb075b Binary files /dev/null and b/resources/images/tokens/AST@3x.png differ diff --git a/resources/images/tokens/ATMChain.png b/resources/images/tokens/ATMChain.png new file mode 100644 index 0000000000..9f5bbd3e91 Binary files /dev/null and b/resources/images/tokens/ATMChain.png differ diff --git a/resources/images/tokens/ATMChain@2x.png b/resources/images/tokens/ATMChain@2x.png new file mode 100644 index 0000000000..d35fb188e2 Binary files /dev/null and b/resources/images/tokens/ATMChain@2x.png differ diff --git a/resources/images/tokens/ATMChain@3x.png b/resources/images/tokens/ATMChain@3x.png new file mode 100644 index 0000000000..802116c29a Binary files /dev/null and b/resources/images/tokens/ATMChain@3x.png differ diff --git a/resources/images/tokens/BAT.png b/resources/images/tokens/BAT.png new file mode 100644 index 0000000000..cd26c65578 Binary files /dev/null and b/resources/images/tokens/BAT.png differ diff --git a/resources/images/tokens/BAT@2x.png b/resources/images/tokens/BAT@2x.png new file mode 100644 index 0000000000..374bc3bcac Binary files /dev/null and b/resources/images/tokens/BAT@2x.png differ diff --git a/resources/images/tokens/BAT@3x.png b/resources/images/tokens/BAT@3x.png new file mode 100644 index 0000000000..93c40c744c Binary files /dev/null and b/resources/images/tokens/BAT@3x.png differ diff --git a/resources/images/tokens/BNB.png b/resources/images/tokens/BNB.png new file mode 100644 index 0000000000..3a503dd606 Binary files /dev/null and b/resources/images/tokens/BNB.png differ diff --git a/resources/images/tokens/BNB@2x.png b/resources/images/tokens/BNB@2x.png new file mode 100644 index 0000000000..79d7eaacbb Binary files /dev/null and b/resources/images/tokens/BNB@2x.png differ diff --git a/resources/images/tokens/BNB@3x.png b/resources/images/tokens/BNB@3x.png new file mode 100644 index 0000000000..bf83cecf10 Binary files /dev/null and b/resources/images/tokens/BNB@3x.png differ diff --git a/resources/images/tokens/BNT.png b/resources/images/tokens/BNT.png new file mode 100644 index 0000000000..5b015fc87b Binary files /dev/null and b/resources/images/tokens/BNT.png differ diff --git a/resources/images/tokens/BNT@2x.png b/resources/images/tokens/BNT@2x.png new file mode 100644 index 0000000000..a8d83f1ef0 Binary files /dev/null and b/resources/images/tokens/BNT@2x.png differ diff --git a/resources/images/tokens/BNT@3x.png b/resources/images/tokens/BNT@3x.png new file mode 100644 index 0000000000..eeac8ea3d6 Binary files /dev/null and b/resources/images/tokens/BNT@3x.png differ diff --git a/resources/images/tokens/BTM.png b/resources/images/tokens/BTM.png new file mode 100644 index 0000000000..fb0ef72238 Binary files /dev/null and b/resources/images/tokens/BTM.png differ diff --git a/resources/images/tokens/BTM@2x.png b/resources/images/tokens/BTM@2x.png new file mode 100644 index 0000000000..5828437205 Binary files /dev/null and b/resources/images/tokens/BTM@2x.png differ diff --git a/resources/images/tokens/BTM@3x.png b/resources/images/tokens/BTM@3x.png new file mode 100644 index 0000000000..e9f508fee8 Binary files /dev/null and b/resources/images/tokens/BTM@3x.png differ diff --git a/resources/images/tokens/CDT.png b/resources/images/tokens/CDT.png new file mode 100644 index 0000000000..e6eb88f458 Binary files /dev/null and b/resources/images/tokens/CDT.png differ diff --git a/resources/images/tokens/CDT@2x.png b/resources/images/tokens/CDT@2x.png new file mode 100644 index 0000000000..8d590c1768 Binary files /dev/null and b/resources/images/tokens/CDT@2x.png differ diff --git a/resources/images/tokens/CDT@3x.png b/resources/images/tokens/CDT@3x.png new file mode 100644 index 0000000000..1de5c38e7e Binary files /dev/null and b/resources/images/tokens/CDT@3x.png differ diff --git a/resources/images/tokens/CFI.png b/resources/images/tokens/CFI.png new file mode 100644 index 0000000000..baa442c632 Binary files /dev/null and b/resources/images/tokens/CFI.png differ diff --git a/resources/images/tokens/CFI@2x.png b/resources/images/tokens/CFI@2x.png new file mode 100644 index 0000000000..105ac20db1 Binary files /dev/null and b/resources/images/tokens/CFI@2x.png differ diff --git a/resources/images/tokens/CFI@3x.png b/resources/images/tokens/CFI@3x.png new file mode 100644 index 0000000000..c23f73d187 Binary files /dev/null and b/resources/images/tokens/CFI@3x.png differ diff --git a/resources/images/tokens/CND.png b/resources/images/tokens/CND.png new file mode 100644 index 0000000000..6a6f778861 Binary files /dev/null and b/resources/images/tokens/CND.png differ diff --git a/resources/images/tokens/CND@2x.png b/resources/images/tokens/CND@2x.png new file mode 100644 index 0000000000..79911d2a2a Binary files /dev/null and b/resources/images/tokens/CND@2x.png differ diff --git a/resources/images/tokens/CND@3x.png b/resources/images/tokens/CND@3x.png new file mode 100644 index 0000000000..bc5ac8bda3 Binary files /dev/null and b/resources/images/tokens/CND@3x.png differ diff --git a/resources/images/tokens/COB.png b/resources/images/tokens/COB.png new file mode 100644 index 0000000000..350a20f1cb Binary files /dev/null and b/resources/images/tokens/COB.png differ diff --git a/resources/images/tokens/COB@2x.png b/resources/images/tokens/COB@2x.png new file mode 100644 index 0000000000..de3858e4a3 Binary files /dev/null and b/resources/images/tokens/COB@2x.png differ diff --git a/resources/images/tokens/COB@3x.png b/resources/images/tokens/COB@3x.png new file mode 100644 index 0000000000..8562564d77 Binary files /dev/null and b/resources/images/tokens/COB@3x.png differ diff --git a/resources/images/tokens/CVC.png b/resources/images/tokens/CVC.png new file mode 100644 index 0000000000..1e1b37771f Binary files /dev/null and b/resources/images/tokens/CVC.png differ diff --git a/resources/images/tokens/CVC@2x.png b/resources/images/tokens/CVC@2x.png new file mode 100644 index 0000000000..92964cde84 Binary files /dev/null and b/resources/images/tokens/CVC@2x.png differ diff --git a/resources/images/tokens/CVC@3x.png b/resources/images/tokens/CVC@3x.png new file mode 100644 index 0000000000..8c7548a35a Binary files /dev/null and b/resources/images/tokens/CVC@3x.png differ diff --git a/resources/images/tokens/Centra.png b/resources/images/tokens/Centra.png new file mode 100644 index 0000000000..687c32c0e7 Binary files /dev/null and b/resources/images/tokens/Centra.png differ diff --git a/resources/images/tokens/Centra@2x.png b/resources/images/tokens/Centra@2x.png new file mode 100644 index 0000000000..27d6c2b6ba Binary files /dev/null and b/resources/images/tokens/Centra@2x.png differ diff --git a/resources/images/tokens/Centra@3x.png b/resources/images/tokens/Centra@3x.png new file mode 100644 index 0000000000..40a57118e7 Binary files /dev/null and b/resources/images/tokens/Centra@3x.png differ diff --git a/resources/images/tokens/DATA.png b/resources/images/tokens/DATA.png new file mode 100644 index 0000000000..3762797928 Binary files /dev/null and b/resources/images/tokens/DATA.png differ diff --git a/resources/images/tokens/DATA@2x.png b/resources/images/tokens/DATA@2x.png new file mode 100644 index 0000000000..d843eae637 Binary files /dev/null and b/resources/images/tokens/DATA@2x.png differ diff --git a/resources/images/tokens/DATA@3x.png b/resources/images/tokens/DATA@3x.png new file mode 100644 index 0000000000..5ebe791367 Binary files /dev/null and b/resources/images/tokens/DATA@3x.png differ diff --git a/resources/images/tokens/DCN.png b/resources/images/tokens/DCN.png new file mode 100644 index 0000000000..881587757c Binary files /dev/null and b/resources/images/tokens/DCN.png differ diff --git a/resources/images/tokens/DCN@2x.png b/resources/images/tokens/DCN@2x.png new file mode 100644 index 0000000000..91a6d2afa2 Binary files /dev/null and b/resources/images/tokens/DCN@2x.png differ diff --git a/resources/images/tokens/DCN@3x.png b/resources/images/tokens/DCN@3x.png new file mode 100644 index 0000000000..e32e9c5e7c Binary files /dev/null and b/resources/images/tokens/DCN@3x.png differ diff --git a/resources/images/tokens/DGD.png b/resources/images/tokens/DGD.png new file mode 100644 index 0000000000..70b956e0d8 Binary files /dev/null and b/resources/images/tokens/DGD.png differ diff --git a/resources/images/tokens/DGD@2x.png b/resources/images/tokens/DGD@2x.png new file mode 100644 index 0000000000..d7b8feb6b1 Binary files /dev/null and b/resources/images/tokens/DGD@2x.png differ diff --git a/resources/images/tokens/DGD@3x.png b/resources/images/tokens/DGD@3x.png new file mode 100644 index 0000000000..767dbb3c4b Binary files /dev/null and b/resources/images/tokens/DGD@3x.png differ diff --git a/resources/images/tokens/DLT.png b/resources/images/tokens/DLT.png new file mode 100644 index 0000000000..059e0a20ea Binary files /dev/null and b/resources/images/tokens/DLT.png differ diff --git a/resources/images/tokens/DLT@2x.png b/resources/images/tokens/DLT@2x.png new file mode 100644 index 0000000000..eb7892a786 Binary files /dev/null and b/resources/images/tokens/DLT@2x.png differ diff --git a/resources/images/tokens/DLT@3x.png b/resources/images/tokens/DLT@3x.png new file mode 100644 index 0000000000..821fa8787d Binary files /dev/null and b/resources/images/tokens/DLT@3x.png differ diff --git a/resources/images/tokens/DNT.png b/resources/images/tokens/DNT.png new file mode 100644 index 0000000000..bc953314d0 Binary files /dev/null and b/resources/images/tokens/DNT.png differ diff --git a/resources/images/tokens/DNT@2x.png b/resources/images/tokens/DNT@2x.png new file mode 100644 index 0000000000..ce59a606b7 Binary files /dev/null and b/resources/images/tokens/DNT@2x.png differ diff --git a/resources/images/tokens/DNT@3x.png b/resources/images/tokens/DNT@3x.png new file mode 100644 index 0000000000..5488be2f60 Binary files /dev/null and b/resources/images/tokens/DNT@3x.png differ diff --git a/resources/images/tokens/DPY.png b/resources/images/tokens/DPY.png new file mode 100644 index 0000000000..1ffe8bf2db Binary files /dev/null and b/resources/images/tokens/DPY.png differ diff --git a/resources/images/tokens/DPY@2x.png b/resources/images/tokens/DPY@2x.png new file mode 100644 index 0000000000..458cd34fbb Binary files /dev/null and b/resources/images/tokens/DPY@2x.png differ diff --git a/resources/images/tokens/DPY@3x.png b/resources/images/tokens/DPY@3x.png new file mode 100644 index 0000000000..9951b996fd Binary files /dev/null and b/resources/images/tokens/DPY@3x.png differ diff --git a/resources/images/tokens/DRT.png b/resources/images/tokens/DRT.png new file mode 100644 index 0000000000..5a30b3b762 Binary files /dev/null and b/resources/images/tokens/DRT.png differ diff --git a/resources/images/tokens/DRT@2x.png b/resources/images/tokens/DRT@2x.png new file mode 100644 index 0000000000..e8c0f0bfc5 Binary files /dev/null and b/resources/images/tokens/DRT@2x.png differ diff --git a/resources/images/tokens/DRT@3x.png b/resources/images/tokens/DRT@3x.png new file mode 100644 index 0000000000..52c9f01bbe Binary files /dev/null and b/resources/images/tokens/DRT@3x.png differ diff --git a/resources/images/tokens/EDG.png b/resources/images/tokens/EDG.png new file mode 100644 index 0000000000..6563f8222f Binary files /dev/null and b/resources/images/tokens/EDG.png differ diff --git a/resources/images/tokens/EDG@2x.png b/resources/images/tokens/EDG@2x.png new file mode 100644 index 0000000000..cbf0387851 Binary files /dev/null and b/resources/images/tokens/EDG@2x.png differ diff --git a/resources/images/tokens/EDG@3x.png b/resources/images/tokens/EDG@3x.png new file mode 100644 index 0000000000..839939b5b9 Binary files /dev/null and b/resources/images/tokens/EDG@3x.png differ diff --git a/resources/images/tokens/EDO.png b/resources/images/tokens/EDO.png new file mode 100644 index 0000000000..ee94e8ab0e Binary files /dev/null and b/resources/images/tokens/EDO.png differ diff --git a/resources/images/tokens/EDO@2x.png b/resources/images/tokens/EDO@2x.png new file mode 100644 index 0000000000..80f922a891 Binary files /dev/null and b/resources/images/tokens/EDO@2x.png differ diff --git a/resources/images/tokens/EDO@3x.png b/resources/images/tokens/EDO@3x.png new file mode 100644 index 0000000000..68a34fdf75 Binary files /dev/null and b/resources/images/tokens/EDO@3x.png differ diff --git a/resources/images/tokens/ENG.png b/resources/images/tokens/ENG.png new file mode 100644 index 0000000000..3cb39c93bb Binary files /dev/null and b/resources/images/tokens/ENG.png differ diff --git a/resources/images/tokens/ENG@2x.png b/resources/images/tokens/ENG@2x.png new file mode 100644 index 0000000000..f94566b42d Binary files /dev/null and b/resources/images/tokens/ENG@2x.png differ diff --git a/resources/images/tokens/ENG@3x.png b/resources/images/tokens/ENG@3x.png new file mode 100644 index 0000000000..b8b5de0a86 Binary files /dev/null and b/resources/images/tokens/ENG@3x.png differ diff --git a/resources/images/tokens/EOS.png b/resources/images/tokens/EOS.png new file mode 100644 index 0000000000..4b5f3ae4d9 Binary files /dev/null and b/resources/images/tokens/EOS.png differ diff --git a/resources/images/tokens/EOS@2x.png b/resources/images/tokens/EOS@2x.png new file mode 100644 index 0000000000..2ee5b5865e Binary files /dev/null and b/resources/images/tokens/EOS@2x.png differ diff --git a/resources/images/tokens/EOS@3x.png b/resources/images/tokens/EOS@3x.png new file mode 100644 index 0000000000..c17d7374e5 Binary files /dev/null and b/resources/images/tokens/EOS@3x.png differ diff --git a/resources/images/tokens/ETHOS.png b/resources/images/tokens/ETHOS.png new file mode 100644 index 0000000000..5116a3929c Binary files /dev/null and b/resources/images/tokens/ETHOS.png differ diff --git a/resources/images/tokens/ETHOS@2x.png b/resources/images/tokens/ETHOS@2x.png new file mode 100644 index 0000000000..33ce81506d Binary files /dev/null and b/resources/images/tokens/ETHOS@2x.png differ diff --git a/resources/images/tokens/ETHOS@3x.png b/resources/images/tokens/ETHOS@3x.png new file mode 100644 index 0000000000..31a9722ba2 Binary files /dev/null and b/resources/images/tokens/ETHOS@3x.png differ diff --git a/resources/images/tokens/EVX.png b/resources/images/tokens/EVX.png new file mode 100644 index 0000000000..12252094ea Binary files /dev/null and b/resources/images/tokens/EVX.png differ diff --git a/resources/images/tokens/EVX@2x.png b/resources/images/tokens/EVX@2x.png new file mode 100644 index 0000000000..3d9d0cb3c0 Binary files /dev/null and b/resources/images/tokens/EVX@2x.png differ diff --git a/resources/images/tokens/EVX@3x.png b/resources/images/tokens/EVX@3x.png new file mode 100644 index 0000000000..998178508d Binary files /dev/null and b/resources/images/tokens/EVX@3x.png differ diff --git a/resources/images/tokens/FUEL.png b/resources/images/tokens/FUEL.png new file mode 100644 index 0000000000..f11895a26d Binary files /dev/null and b/resources/images/tokens/FUEL.png differ diff --git a/resources/images/tokens/FUEL@2x.png b/resources/images/tokens/FUEL@2x.png new file mode 100644 index 0000000000..25a84fc321 Binary files /dev/null and b/resources/images/tokens/FUEL@2x.png differ diff --git a/resources/images/tokens/FUEL@3x.png b/resources/images/tokens/FUEL@3x.png new file mode 100644 index 0000000000..5b746194bc Binary files /dev/null and b/resources/images/tokens/FUEL@3x.png differ diff --git a/resources/images/tokens/FUN.png b/resources/images/tokens/FUN.png new file mode 100644 index 0000000000..5b6f236163 Binary files /dev/null and b/resources/images/tokens/FUN.png differ diff --git a/resources/images/tokens/FUN@2x.png b/resources/images/tokens/FUN@2x.png new file mode 100644 index 0000000000..e62f23ed03 Binary files /dev/null and b/resources/images/tokens/FUN@2x.png differ diff --git a/resources/images/tokens/FUN@3x.png b/resources/images/tokens/FUN@3x.png new file mode 100644 index 0000000000..ee6935738c Binary files /dev/null and b/resources/images/tokens/FUN@3x.png differ diff --git a/resources/images/tokens/GNO.png b/resources/images/tokens/GNO.png new file mode 100644 index 0000000000..3f35f00d42 Binary files /dev/null and b/resources/images/tokens/GNO.png differ diff --git a/resources/images/tokens/GNO@2x.png b/resources/images/tokens/GNO@2x.png new file mode 100644 index 0000000000..15226acf0f Binary files /dev/null and b/resources/images/tokens/GNO@2x.png differ diff --git a/resources/images/tokens/GNO@3x.png b/resources/images/tokens/GNO@3x.png new file mode 100644 index 0000000000..6f5262b987 Binary files /dev/null and b/resources/images/tokens/GNO@3x.png differ diff --git a/resources/images/tokens/GNT.png b/resources/images/tokens/GNT.png new file mode 100644 index 0000000000..50fa92a3d7 Binary files /dev/null and b/resources/images/tokens/GNT.png differ diff --git a/resources/images/tokens/GNT@2x.png b/resources/images/tokens/GNT@2x.png new file mode 100644 index 0000000000..737d3dce3f Binary files /dev/null and b/resources/images/tokens/GNT@2x.png differ diff --git a/resources/images/tokens/GNT@3x.png b/resources/images/tokens/GNT@3x.png new file mode 100644 index 0000000000..44d0c41aa6 Binary files /dev/null and b/resources/images/tokens/GNT@3x.png differ diff --git a/resources/images/tokens/GRID.png b/resources/images/tokens/GRID.png new file mode 100644 index 0000000000..bb4019969d Binary files /dev/null and b/resources/images/tokens/GRID.png differ diff --git a/resources/images/tokens/GRID@2x.png b/resources/images/tokens/GRID@2x.png new file mode 100644 index 0000000000..613f799ee4 Binary files /dev/null and b/resources/images/tokens/GRID@2x.png differ diff --git a/resources/images/tokens/GRID@3x.png b/resources/images/tokens/GRID@3x.png new file mode 100644 index 0000000000..1271ce57e2 Binary files /dev/null and b/resources/images/tokens/GRID@3x.png differ diff --git a/resources/images/tokens/HST.png b/resources/images/tokens/HST.png new file mode 100644 index 0000000000..eade6afd25 Binary files /dev/null and b/resources/images/tokens/HST.png differ diff --git a/resources/images/tokens/HST@2x.png b/resources/images/tokens/HST@2x.png new file mode 100644 index 0000000000..9a97cba044 Binary files /dev/null and b/resources/images/tokens/HST@2x.png differ diff --git a/resources/images/tokens/HST@3x.png b/resources/images/tokens/HST@3x.png new file mode 100644 index 0000000000..10a8018c59 Binary files /dev/null and b/resources/images/tokens/HST@3x.png differ diff --git a/resources/images/tokens/ICN.png b/resources/images/tokens/ICN.png new file mode 100644 index 0000000000..585ec9e7ce Binary files /dev/null and b/resources/images/tokens/ICN.png differ diff --git a/resources/images/tokens/ICN@2x.png b/resources/images/tokens/ICN@2x.png new file mode 100644 index 0000000000..7285df901e Binary files /dev/null and b/resources/images/tokens/ICN@2x.png differ diff --git a/resources/images/tokens/ICN@3x.png b/resources/images/tokens/ICN@3x.png new file mode 100644 index 0000000000..baf3078119 Binary files /dev/null and b/resources/images/tokens/ICN@3x.png differ diff --git a/resources/images/tokens/ICOS.png b/resources/images/tokens/ICOS.png new file mode 100644 index 0000000000..a77120d930 Binary files /dev/null and b/resources/images/tokens/ICOS.png differ diff --git a/resources/images/tokens/ICOS@2x.png b/resources/images/tokens/ICOS@2x.png new file mode 100644 index 0000000000..1f069c3e5f Binary files /dev/null and b/resources/images/tokens/ICOS@2x.png differ diff --git a/resources/images/tokens/ICOS@3x.png b/resources/images/tokens/ICOS@3x.png new file mode 100644 index 0000000000..2f9f8adc84 Binary files /dev/null and b/resources/images/tokens/ICOS@3x.png differ diff --git a/resources/images/tokens/KIN.png b/resources/images/tokens/KIN.png new file mode 100644 index 0000000000..d3b57e83ef Binary files /dev/null and b/resources/images/tokens/KIN.png differ diff --git a/resources/images/tokens/KIN@2x.png b/resources/images/tokens/KIN@2x.png new file mode 100644 index 0000000000..77b30dca87 Binary files /dev/null and b/resources/images/tokens/KIN@2x.png differ diff --git a/resources/images/tokens/KIN@3x.png b/resources/images/tokens/KIN@3x.png new file mode 100644 index 0000000000..763ace9254 Binary files /dev/null and b/resources/images/tokens/KIN@3x.png differ diff --git a/resources/images/tokens/KNC.png b/resources/images/tokens/KNC.png new file mode 100644 index 0000000000..7c0f2945e2 Binary files /dev/null and b/resources/images/tokens/KNC.png differ diff --git a/resources/images/tokens/KNC@2x.png b/resources/images/tokens/KNC@2x.png new file mode 100644 index 0000000000..9dbf23479a Binary files /dev/null and b/resources/images/tokens/KNC@2x.png differ diff --git a/resources/images/tokens/KNC@3x.png b/resources/images/tokens/KNC@3x.png new file mode 100644 index 0000000000..4d7dd17d8f Binary files /dev/null and b/resources/images/tokens/KNC@3x.png differ diff --git a/resources/images/tokens/LINK.png b/resources/images/tokens/LINK.png new file mode 100644 index 0000000000..37b4a9d88c Binary files /dev/null and b/resources/images/tokens/LINK.png differ diff --git a/resources/images/tokens/LINK@2x.png b/resources/images/tokens/LINK@2x.png new file mode 100644 index 0000000000..b25c0813c6 Binary files /dev/null and b/resources/images/tokens/LINK@2x.png differ diff --git a/resources/images/tokens/LINK@3x.png b/resources/images/tokens/LINK@3x.png new file mode 100644 index 0000000000..70800be696 Binary files /dev/null and b/resources/images/tokens/LINK@3x.png differ diff --git a/resources/images/tokens/LISK.png b/resources/images/tokens/LISK.png new file mode 100644 index 0000000000..ae120a2644 Binary files /dev/null and b/resources/images/tokens/LISK.png differ diff --git a/resources/images/tokens/LISK@2x.png b/resources/images/tokens/LISK@2x.png new file mode 100644 index 0000000000..01d884a7e0 Binary files /dev/null and b/resources/images/tokens/LISK@2x.png differ diff --git a/resources/images/tokens/LISK@3x.png b/resources/images/tokens/LISK@3x.png new file mode 100644 index 0000000000..79b91f4340 Binary files /dev/null and b/resources/images/tokens/LISK@3x.png differ diff --git a/resources/images/tokens/LRC.png b/resources/images/tokens/LRC.png new file mode 100644 index 0000000000..c981e6fb1c Binary files /dev/null and b/resources/images/tokens/LRC.png differ diff --git a/resources/images/tokens/LRC@2x.png b/resources/images/tokens/LRC@2x.png new file mode 100644 index 0000000000..e3498f288c Binary files /dev/null and b/resources/images/tokens/LRC@2x.png differ diff --git a/resources/images/tokens/LRC@3x.png b/resources/images/tokens/LRC@3x.png new file mode 100644 index 0000000000..566cfcbf10 Binary files /dev/null and b/resources/images/tokens/LRC@3x.png differ diff --git a/resources/images/tokens/MANA.png b/resources/images/tokens/MANA.png new file mode 100644 index 0000000000..12c7821bca Binary files /dev/null and b/resources/images/tokens/MANA.png differ diff --git a/resources/images/tokens/MANA@2x.png b/resources/images/tokens/MANA@2x.png new file mode 100644 index 0000000000..1f68b51017 Binary files /dev/null and b/resources/images/tokens/MANA@2x.png differ diff --git a/resources/images/tokens/MANA@3x.png b/resources/images/tokens/MANA@3x.png new file mode 100644 index 0000000000..601b3aeafb Binary files /dev/null and b/resources/images/tokens/MANA@3x.png differ diff --git a/resources/images/tokens/MCO.png b/resources/images/tokens/MCO.png new file mode 100644 index 0000000000..2beb7ffbb8 Binary files /dev/null and b/resources/images/tokens/MCO.png differ diff --git a/resources/images/tokens/MCO@2x.png b/resources/images/tokens/MCO@2x.png new file mode 100644 index 0000000000..8c17faad2e Binary files /dev/null and b/resources/images/tokens/MCO@2x.png differ diff --git a/resources/images/tokens/MCO@3x.png b/resources/images/tokens/MCO@3x.png new file mode 100644 index 0000000000..38926d7a33 Binary files /dev/null and b/resources/images/tokens/MCO@3x.png differ diff --git a/resources/images/tokens/MDA.png b/resources/images/tokens/MDA.png new file mode 100644 index 0000000000..032c9686fd Binary files /dev/null and b/resources/images/tokens/MDA.png differ diff --git a/resources/images/tokens/MDA@2x.png b/resources/images/tokens/MDA@2x.png new file mode 100644 index 0000000000..026fadda6f Binary files /dev/null and b/resources/images/tokens/MDA@2x.png differ diff --git a/resources/images/tokens/MDA@3x.png b/resources/images/tokens/MDA@3x.png new file mode 100644 index 0000000000..5aea76dbcf Binary files /dev/null and b/resources/images/tokens/MDA@3x.png differ diff --git a/resources/images/tokens/MGO.png b/resources/images/tokens/MGO.png new file mode 100644 index 0000000000..e1129be21b Binary files /dev/null and b/resources/images/tokens/MGO.png differ diff --git a/resources/images/tokens/MGO@2x.png b/resources/images/tokens/MGO@2x.png new file mode 100644 index 0000000000..becaaea91c Binary files /dev/null and b/resources/images/tokens/MGO@2x.png differ diff --git a/resources/images/tokens/MGO@3x.png b/resources/images/tokens/MGO@3x.png new file mode 100644 index 0000000000..4f346b3204 Binary files /dev/null and b/resources/images/tokens/MGO@3x.png differ diff --git a/resources/images/tokens/MLN.png b/resources/images/tokens/MLN.png new file mode 100644 index 0000000000..ff373e6fe9 Binary files /dev/null and b/resources/images/tokens/MLN.png differ diff --git a/resources/images/tokens/MLN@2x.png b/resources/images/tokens/MLN@2x.png new file mode 100644 index 0000000000..e03b628cca Binary files /dev/null and b/resources/images/tokens/MLN@2x.png differ diff --git a/resources/images/tokens/MLN@3x.png b/resources/images/tokens/MLN@3x.png new file mode 100644 index 0000000000..cc48a8ea4f Binary files /dev/null and b/resources/images/tokens/MLN@3x.png differ diff --git a/resources/images/tokens/MOD.png b/resources/images/tokens/MOD.png new file mode 100644 index 0000000000..318310cc16 Binary files /dev/null and b/resources/images/tokens/MOD.png differ diff --git a/resources/images/tokens/MOD@2x.png b/resources/images/tokens/MOD@2x.png new file mode 100644 index 0000000000..e2fa11c829 Binary files /dev/null and b/resources/images/tokens/MOD@2x.png differ diff --git a/resources/images/tokens/MOD@3x.png b/resources/images/tokens/MOD@3x.png new file mode 100644 index 0000000000..4a6f89df4b Binary files /dev/null and b/resources/images/tokens/MOD@3x.png differ diff --git a/resources/images/tokens/MTH.png b/resources/images/tokens/MTH.png new file mode 100644 index 0000000000..b84be27925 Binary files /dev/null and b/resources/images/tokens/MTH.png differ diff --git a/resources/images/tokens/MTH@2x.png b/resources/images/tokens/MTH@2x.png new file mode 100644 index 0000000000..7e2f397eb4 Binary files /dev/null and b/resources/images/tokens/MTH@2x.png differ diff --git a/resources/images/tokens/MTH@3x.png b/resources/images/tokens/MTH@3x.png new file mode 100644 index 0000000000..7db2630b68 Binary files /dev/null and b/resources/images/tokens/MTH@3x.png differ diff --git a/resources/images/tokens/NMR.png b/resources/images/tokens/NMR.png new file mode 100644 index 0000000000..da7b92cd89 Binary files /dev/null and b/resources/images/tokens/NMR.png differ diff --git a/resources/images/tokens/NMR@2x.png b/resources/images/tokens/NMR@2x.png new file mode 100644 index 0000000000..7b5674946c Binary files /dev/null and b/resources/images/tokens/NMR@2x.png differ diff --git a/resources/images/tokens/NMR@3x.png b/resources/images/tokens/NMR@3x.png new file mode 100644 index 0000000000..fadb300cc4 Binary files /dev/null and b/resources/images/tokens/NMR@3x.png differ diff --git a/resources/images/tokens/OMG.png b/resources/images/tokens/OMG.png new file mode 100644 index 0000000000..21c36a31b3 Binary files /dev/null and b/resources/images/tokens/OMG.png differ diff --git a/resources/images/tokens/OMG@2x.png b/resources/images/tokens/OMG@2x.png new file mode 100644 index 0000000000..915c667ecf Binary files /dev/null and b/resources/images/tokens/OMG@2x.png differ diff --git a/resources/images/tokens/OMG@3x.png b/resources/images/tokens/OMG@3x.png new file mode 100644 index 0000000000..9fed41ecb8 Binary files /dev/null and b/resources/images/tokens/OMG@3x.png differ diff --git a/resources/images/tokens/OTN.png b/resources/images/tokens/OTN.png new file mode 100644 index 0000000000..11a52e319a Binary files /dev/null and b/resources/images/tokens/OTN.png differ diff --git a/resources/images/tokens/OTN@2x.png b/resources/images/tokens/OTN@2x.png new file mode 100644 index 0000000000..96b865f34a Binary files /dev/null and b/resources/images/tokens/OTN@2x.png differ diff --git a/resources/images/tokens/OTN@3x.png b/resources/images/tokens/OTN@3x.png new file mode 100644 index 0000000000..97a718ddeb Binary files /dev/null and b/resources/images/tokens/OTN@3x.png differ diff --git a/resources/images/tokens/PAY.png b/resources/images/tokens/PAY.png new file mode 100644 index 0000000000..1f96648db8 Binary files /dev/null and b/resources/images/tokens/PAY.png differ diff --git a/resources/images/tokens/PAY@2x.png b/resources/images/tokens/PAY@2x.png new file mode 100644 index 0000000000..81711b075a Binary files /dev/null and b/resources/images/tokens/PAY@2x.png differ diff --git a/resources/images/tokens/PAY@3x.png b/resources/images/tokens/PAY@3x.png new file mode 100644 index 0000000000..7b314ddcbd Binary files /dev/null and b/resources/images/tokens/PAY@3x.png differ diff --git a/resources/images/tokens/PLR.png b/resources/images/tokens/PLR.png new file mode 100644 index 0000000000..e027af2c02 Binary files /dev/null and b/resources/images/tokens/PLR.png differ diff --git a/resources/images/tokens/PLR@2x.png b/resources/images/tokens/PLR@2x.png new file mode 100644 index 0000000000..81362ef81b Binary files /dev/null and b/resources/images/tokens/PLR@2x.png differ diff --git a/resources/images/tokens/PLR@3x.png b/resources/images/tokens/PLR@3x.png new file mode 100644 index 0000000000..63bc118fce Binary files /dev/null and b/resources/images/tokens/PLR@3x.png differ diff --git a/resources/images/tokens/POWR.png b/resources/images/tokens/POWR.png new file mode 100644 index 0000000000..92cf571f6c Binary files /dev/null and b/resources/images/tokens/POWR.png differ diff --git a/resources/images/tokens/POWR@2x.png b/resources/images/tokens/POWR@2x.png new file mode 100644 index 0000000000..847e6fa0ed Binary files /dev/null and b/resources/images/tokens/POWR@2x.png differ diff --git a/resources/images/tokens/POWR@3x.png b/resources/images/tokens/POWR@3x.png new file mode 100644 index 0000000000..a696f83487 Binary files /dev/null and b/resources/images/tokens/POWR@3x.png differ diff --git a/resources/images/tokens/PPP.png b/resources/images/tokens/PPP.png new file mode 100644 index 0000000000..51b1ccbbc8 Binary files /dev/null and b/resources/images/tokens/PPP.png differ diff --git a/resources/images/tokens/PPP@2x.png b/resources/images/tokens/PPP@2x.png new file mode 100644 index 0000000000..ede7da0cc3 Binary files /dev/null and b/resources/images/tokens/PPP@2x.png differ diff --git a/resources/images/tokens/PPP@3x.png b/resources/images/tokens/PPP@3x.png new file mode 100644 index 0000000000..77423baf50 Binary files /dev/null and b/resources/images/tokens/PPP@3x.png differ diff --git a/resources/images/tokens/PPT.png b/resources/images/tokens/PPT.png new file mode 100644 index 0000000000..1568b121a4 Binary files /dev/null and b/resources/images/tokens/PPT.png differ diff --git a/resources/images/tokens/PPT@2x.png b/resources/images/tokens/PPT@2x.png new file mode 100644 index 0000000000..140705a183 Binary files /dev/null and b/resources/images/tokens/PPT@2x.png differ diff --git a/resources/images/tokens/PPT@3x.png b/resources/images/tokens/PPT@3x.png new file mode 100644 index 0000000000..5ba6605d95 Binary files /dev/null and b/resources/images/tokens/PPT@3x.png differ diff --git a/resources/images/tokens/QRL.png b/resources/images/tokens/QRL.png new file mode 100644 index 0000000000..f3b329b963 Binary files /dev/null and b/resources/images/tokens/QRL.png differ diff --git a/resources/images/tokens/QRL@2x.png b/resources/images/tokens/QRL@2x.png new file mode 100644 index 0000000000..1a62d9f84d Binary files /dev/null and b/resources/images/tokens/QRL@2x.png differ diff --git a/resources/images/tokens/QRL@3x.png b/resources/images/tokens/QRL@3x.png new file mode 100644 index 0000000000..3df501b8c9 Binary files /dev/null and b/resources/images/tokens/QRL@3x.png differ diff --git a/resources/images/tokens/QSP.png b/resources/images/tokens/QSP.png new file mode 100644 index 0000000000..bcd21d73b8 Binary files /dev/null and b/resources/images/tokens/QSP.png differ diff --git a/resources/images/tokens/QSP@2x.png b/resources/images/tokens/QSP@2x.png new file mode 100644 index 0000000000..bb5b0a1a03 Binary files /dev/null and b/resources/images/tokens/QSP@2x.png differ diff --git a/resources/images/tokens/QSP@3x.png b/resources/images/tokens/QSP@3x.png new file mode 100644 index 0000000000..677e2baa65 Binary files /dev/null and b/resources/images/tokens/QSP@3x.png differ diff --git a/resources/images/tokens/R.png b/resources/images/tokens/R.png new file mode 100644 index 0000000000..87b74fc82a Binary files /dev/null and b/resources/images/tokens/R.png differ diff --git a/resources/images/tokens/R@2x.png b/resources/images/tokens/R@2x.png new file mode 100644 index 0000000000..c22fd0f21b Binary files /dev/null and b/resources/images/tokens/R@2x.png differ diff --git a/resources/images/tokens/R@3x.png b/resources/images/tokens/R@3x.png new file mode 100644 index 0000000000..95ccda049c Binary files /dev/null and b/resources/images/tokens/R@3x.png differ diff --git a/resources/images/tokens/RCN.png b/resources/images/tokens/RCN.png new file mode 100644 index 0000000000..45ef2ed1e6 Binary files /dev/null and b/resources/images/tokens/RCN.png differ diff --git a/resources/images/tokens/RCN@2x.png b/resources/images/tokens/RCN@2x.png new file mode 100644 index 0000000000..a8118daff5 Binary files /dev/null and b/resources/images/tokens/RCN@2x.png differ diff --git a/resources/images/tokens/RCN@3x.png b/resources/images/tokens/RCN@3x.png new file mode 100644 index 0000000000..1bfdc8f90c Binary files /dev/null and b/resources/images/tokens/RCN@3x.png differ diff --git a/resources/images/tokens/RDN.png b/resources/images/tokens/RDN.png new file mode 100644 index 0000000000..368e1cbf38 Binary files /dev/null and b/resources/images/tokens/RDN.png differ diff --git a/resources/images/tokens/RDN@2x.png b/resources/images/tokens/RDN@2x.png new file mode 100644 index 0000000000..bc550c1f4c Binary files /dev/null and b/resources/images/tokens/RDN@2x.png differ diff --git a/resources/images/tokens/RDN@3x.png b/resources/images/tokens/RDN@3x.png new file mode 100644 index 0000000000..3e4a303c71 Binary files /dev/null and b/resources/images/tokens/RDN@3x.png differ diff --git a/resources/images/tokens/REQ.png b/resources/images/tokens/REQ.png new file mode 100644 index 0000000000..1bb71f5939 Binary files /dev/null and b/resources/images/tokens/REQ.png differ diff --git a/resources/images/tokens/REQ@2x.png b/resources/images/tokens/REQ@2x.png new file mode 100644 index 0000000000..6c6e199409 Binary files /dev/null and b/resources/images/tokens/REQ@2x.png differ diff --git a/resources/images/tokens/REQ@3x.png b/resources/images/tokens/REQ@3x.png new file mode 100644 index 0000000000..794bfcf117 Binary files /dev/null and b/resources/images/tokens/REQ@3x.png differ diff --git a/resources/images/tokens/RHOC.png b/resources/images/tokens/RHOC.png new file mode 100644 index 0000000000..15d9ea6d53 Binary files /dev/null and b/resources/images/tokens/RHOC.png differ diff --git a/resources/images/tokens/RHOC@2x.png b/resources/images/tokens/RHOC@2x.png new file mode 100644 index 0000000000..8b5a5f6dc1 Binary files /dev/null and b/resources/images/tokens/RHOC@2x.png differ diff --git a/resources/images/tokens/RHOC@3x.png b/resources/images/tokens/RHOC@3x.png new file mode 100644 index 0000000000..610453210c Binary files /dev/null and b/resources/images/tokens/RHOC@3x.png differ diff --git a/resources/images/tokens/RLC.png b/resources/images/tokens/RLC.png new file mode 100644 index 0000000000..1d80f20e0b Binary files /dev/null and b/resources/images/tokens/RLC.png differ diff --git a/resources/images/tokens/RLC@2x.png b/resources/images/tokens/RLC@2x.png new file mode 100644 index 0000000000..e3832d7a82 Binary files /dev/null and b/resources/images/tokens/RLC@2x.png differ diff --git a/resources/images/tokens/RLC@3x.png b/resources/images/tokens/RLC@3x.png new file mode 100644 index 0000000000..40d08f515b Binary files /dev/null and b/resources/images/tokens/RLC@3x.png differ diff --git a/resources/images/tokens/ROL.png b/resources/images/tokens/ROL.png new file mode 100644 index 0000000000..032b27e0fa Binary files /dev/null and b/resources/images/tokens/ROL.png differ diff --git a/resources/images/tokens/ROL@2x.png b/resources/images/tokens/ROL@2x.png new file mode 100644 index 0000000000..c935fb2372 Binary files /dev/null and b/resources/images/tokens/ROL@2x.png differ diff --git a/resources/images/tokens/ROL@3x.png b/resources/images/tokens/ROL@3x.png new file mode 100644 index 0000000000..0c57da0a2e Binary files /dev/null and b/resources/images/tokens/ROL@3x.png differ diff --git a/resources/images/tokens/SALT.png b/resources/images/tokens/SALT.png new file mode 100644 index 0000000000..a511472cd9 Binary files /dev/null and b/resources/images/tokens/SALT.png differ diff --git a/resources/images/tokens/SALT@2x.png b/resources/images/tokens/SALT@2x.png new file mode 100644 index 0000000000..89d61e0e7e Binary files /dev/null and b/resources/images/tokens/SALT@2x.png differ diff --git a/resources/images/tokens/SALT@3x.png b/resources/images/tokens/SALT@3x.png new file mode 100644 index 0000000000..4da0f28a03 Binary files /dev/null and b/resources/images/tokens/SALT@3x.png differ diff --git a/resources/images/tokens/SAN.png b/resources/images/tokens/SAN.png new file mode 100644 index 0000000000..d4d49bea39 Binary files /dev/null and b/resources/images/tokens/SAN.png differ diff --git a/resources/images/tokens/SAN@2x.png b/resources/images/tokens/SAN@2x.png new file mode 100644 index 0000000000..42f8b8fb5c Binary files /dev/null and b/resources/images/tokens/SAN@2x.png differ diff --git a/resources/images/tokens/SAN@3x.png b/resources/images/tokens/SAN@3x.png new file mode 100644 index 0000000000..5be302445a Binary files /dev/null and b/resources/images/tokens/SAN@3x.png differ diff --git a/resources/images/tokens/SNGLS.png b/resources/images/tokens/SNGLS.png new file mode 100644 index 0000000000..ede7af951d Binary files /dev/null and b/resources/images/tokens/SNGLS.png differ diff --git a/resources/images/tokens/SNGLS@2x.png b/resources/images/tokens/SNGLS@2x.png new file mode 100644 index 0000000000..c1a2053df7 Binary files /dev/null and b/resources/images/tokens/SNGLS@2x.png differ diff --git a/resources/images/tokens/SNGLS@3x.png b/resources/images/tokens/SNGLS@3x.png new file mode 100644 index 0000000000..609b234251 Binary files /dev/null and b/resources/images/tokens/SNGLS@3x.png differ diff --git a/resources/images/tokens/SNM.png b/resources/images/tokens/SNM.png new file mode 100644 index 0000000000..1934ecdf9d Binary files /dev/null and b/resources/images/tokens/SNM.png differ diff --git a/resources/images/tokens/SNM@2x.png b/resources/images/tokens/SNM@2x.png new file mode 100644 index 0000000000..5d5c29f3d9 Binary files /dev/null and b/resources/images/tokens/SNM@2x.png differ diff --git a/resources/images/tokens/SNM@3x.png b/resources/images/tokens/SNM@3x.png new file mode 100644 index 0000000000..8913f8fa49 Binary files /dev/null and b/resources/images/tokens/SNM@3x.png differ diff --git a/resources/images/tokens/SNT.png b/resources/images/tokens/SNT.png new file mode 100644 index 0000000000..323c5d2026 Binary files /dev/null and b/resources/images/tokens/SNT.png differ diff --git a/resources/images/tokens/SNT@2x.png b/resources/images/tokens/SNT@2x.png new file mode 100644 index 0000000000..c87a6f2e74 Binary files /dev/null and b/resources/images/tokens/SNT@2x.png differ diff --git a/resources/images/tokens/SNT@3x.png b/resources/images/tokens/SNT@3x.png new file mode 100644 index 0000000000..09ef45c59d Binary files /dev/null and b/resources/images/tokens/SNT@3x.png differ diff --git a/resources/images/tokens/STORJ.png b/resources/images/tokens/STORJ.png new file mode 100644 index 0000000000..f22d9340fc Binary files /dev/null and b/resources/images/tokens/STORJ.png differ diff --git a/resources/images/tokens/STORJ@2x.png b/resources/images/tokens/STORJ@2x.png new file mode 100644 index 0000000000..f64d3ad225 Binary files /dev/null and b/resources/images/tokens/STORJ@2x.png differ diff --git a/resources/images/tokens/STORJ@3x.png b/resources/images/tokens/STORJ@3x.png new file mode 100644 index 0000000000..a88d504597 Binary files /dev/null and b/resources/images/tokens/STORJ@3x.png differ diff --git a/resources/images/tokens/STX.png b/resources/images/tokens/STX.png new file mode 100644 index 0000000000..f9fd776c8a Binary files /dev/null and b/resources/images/tokens/STX.png differ diff --git a/resources/images/tokens/STX@2x.png b/resources/images/tokens/STX@2x.png new file mode 100644 index 0000000000..b868655ef1 Binary files /dev/null and b/resources/images/tokens/STX@2x.png differ diff --git a/resources/images/tokens/STX@3x.png b/resources/images/tokens/STX@3x.png new file mode 100644 index 0000000000..e39f5276f9 Binary files /dev/null and b/resources/images/tokens/STX@3x.png differ diff --git a/resources/images/tokens/SUB.png b/resources/images/tokens/SUB.png new file mode 100644 index 0000000000..e5122f8ee3 Binary files /dev/null and b/resources/images/tokens/SUB.png differ diff --git a/resources/images/tokens/SUB@2x.png b/resources/images/tokens/SUB@2x.png new file mode 100644 index 0000000000..c94d7a3e73 Binary files /dev/null and b/resources/images/tokens/SUB@2x.png differ diff --git a/resources/images/tokens/SUB@3x.png b/resources/images/tokens/SUB@3x.png new file mode 100644 index 0000000000..aa3db9f2e4 Binary files /dev/null and b/resources/images/tokens/SUB@3x.png differ diff --git a/resources/images/tokens/TAAS.png b/resources/images/tokens/TAAS.png new file mode 100644 index 0000000000..0d905d345b Binary files /dev/null and b/resources/images/tokens/TAAS.png differ diff --git a/resources/images/tokens/TAAS@2x.png b/resources/images/tokens/TAAS@2x.png new file mode 100644 index 0000000000..1e148e6182 Binary files /dev/null and b/resources/images/tokens/TAAS@2x.png differ diff --git a/resources/images/tokens/TAAS@3x.png b/resources/images/tokens/TAAS@3x.png new file mode 100644 index 0000000000..42f58fafbe Binary files /dev/null and b/resources/images/tokens/TAAS@3x.png differ diff --git a/resources/images/tokens/TKN.png b/resources/images/tokens/TKN.png new file mode 100644 index 0000000000..f27ec04a8b Binary files /dev/null and b/resources/images/tokens/TKN.png differ diff --git a/resources/images/tokens/TKN@2x.png b/resources/images/tokens/TKN@2x.png new file mode 100644 index 0000000000..2fbc33c816 Binary files /dev/null and b/resources/images/tokens/TKN@2x.png differ diff --git a/resources/images/tokens/TKN@3x.png b/resources/images/tokens/TKN@3x.png new file mode 100644 index 0000000000..8c7b8e8e91 Binary files /dev/null and b/resources/images/tokens/TKN@3x.png differ diff --git a/resources/images/tokens/TNT.png b/resources/images/tokens/TNT.png new file mode 100644 index 0000000000..39b7b639a8 Binary files /dev/null and b/resources/images/tokens/TNT.png differ diff --git a/resources/images/tokens/TNT@2x.png b/resources/images/tokens/TNT@2x.png new file mode 100644 index 0000000000..1fb677341d Binary files /dev/null and b/resources/images/tokens/TNT@2x.png differ diff --git a/resources/images/tokens/TNT@3x.png b/resources/images/tokens/TNT@3x.png new file mode 100644 index 0000000000..650365fdad Binary files /dev/null and b/resources/images/tokens/TNT@3x.png differ diff --git a/resources/images/tokens/TRST.png b/resources/images/tokens/TRST.png new file mode 100644 index 0000000000..4dfee0ba3c Binary files /dev/null and b/resources/images/tokens/TRST.png differ diff --git a/resources/images/tokens/TRST@2x.png b/resources/images/tokens/TRST@2x.png new file mode 100644 index 0000000000..de35e624bf Binary files /dev/null and b/resources/images/tokens/TRST@2x.png differ diff --git a/resources/images/tokens/TRST@3x.png b/resources/images/tokens/TRST@3x.png new file mode 100644 index 0000000000..c6da69e127 Binary files /dev/null and b/resources/images/tokens/TRST@3x.png differ diff --git a/resources/images/tokens/TRX.png b/resources/images/tokens/TRX.png new file mode 100644 index 0000000000..f11c3d5b3a Binary files /dev/null and b/resources/images/tokens/TRX.png differ diff --git a/resources/images/tokens/TRX@2x.png b/resources/images/tokens/TRX@2x.png new file mode 100644 index 0000000000..0348cd3784 Binary files /dev/null and b/resources/images/tokens/TRX@2x.png differ diff --git a/resources/images/tokens/TRX@3x.png b/resources/images/tokens/TRX@3x.png new file mode 100644 index 0000000000..bbdb6c205e Binary files /dev/null and b/resources/images/tokens/TRX@3x.png differ diff --git a/resources/images/tokens/UKG.png b/resources/images/tokens/UKG.png new file mode 100644 index 0000000000..f185a94881 Binary files /dev/null and b/resources/images/tokens/UKG.png differ diff --git a/resources/images/tokens/UKG@2x.png b/resources/images/tokens/UKG@2x.png new file mode 100644 index 0000000000..eb1dbdb734 Binary files /dev/null and b/resources/images/tokens/UKG@2x.png differ diff --git a/resources/images/tokens/UKG@3x.png b/resources/images/tokens/UKG@3x.png new file mode 100644 index 0000000000..f3e04721bf Binary files /dev/null and b/resources/images/tokens/UKG@3x.png differ diff --git a/resources/images/tokens/VERI.png b/resources/images/tokens/VERI.png new file mode 100644 index 0000000000..51ecff0e24 Binary files /dev/null and b/resources/images/tokens/VERI.png differ diff --git a/resources/images/tokens/VERI@2x.png b/resources/images/tokens/VERI@2x.png new file mode 100644 index 0000000000..8732360c97 Binary files /dev/null and b/resources/images/tokens/VERI@2x.png differ diff --git a/resources/images/tokens/VERI@3x.png b/resources/images/tokens/VERI@3x.png new file mode 100644 index 0000000000..ad606bcf97 Binary files /dev/null and b/resources/images/tokens/VERI@3x.png differ diff --git a/resources/images/tokens/VIB.png b/resources/images/tokens/VIB.png new file mode 100644 index 0000000000..d5848560c8 Binary files /dev/null and b/resources/images/tokens/VIB.png differ diff --git a/resources/images/tokens/VIB@2x.png b/resources/images/tokens/VIB@2x.png new file mode 100644 index 0000000000..66a499352d Binary files /dev/null and b/resources/images/tokens/VIB@2x.png differ diff --git a/resources/images/tokens/VIB@3x.png b/resources/images/tokens/VIB@3x.png new file mode 100644 index 0000000000..5ad778adfd Binary files /dev/null and b/resources/images/tokens/VIB@3x.png differ diff --git a/resources/images/tokens/WINGS.png b/resources/images/tokens/WINGS.png new file mode 100644 index 0000000000..ed07b1949b Binary files /dev/null and b/resources/images/tokens/WINGS.png differ diff --git a/resources/images/tokens/WINGS@2x.png b/resources/images/tokens/WINGS@2x.png new file mode 100644 index 0000000000..ffa5b2584f Binary files /dev/null and b/resources/images/tokens/WINGS@2x.png differ diff --git a/resources/images/tokens/WINGS@3x.png b/resources/images/tokens/WINGS@3x.png new file mode 100644 index 0000000000..3df3dddd98 Binary files /dev/null and b/resources/images/tokens/WINGS@3x.png differ diff --git a/resources/images/tokens/WTC.png b/resources/images/tokens/WTC.png new file mode 100644 index 0000000000..65398986d0 Binary files /dev/null and b/resources/images/tokens/WTC.png differ diff --git a/resources/images/tokens/WTC@2x.png b/resources/images/tokens/WTC@2x.png new file mode 100644 index 0000000000..f92185c0c5 Binary files /dev/null and b/resources/images/tokens/WTC@2x.png differ diff --git a/resources/images/tokens/WTC@3x.png b/resources/images/tokens/WTC@3x.png new file mode 100644 index 0000000000..0b1976d828 Binary files /dev/null and b/resources/images/tokens/WTC@3x.png differ diff --git a/resources/images/tokens/XAUR.png b/resources/images/tokens/XAUR.png new file mode 100644 index 0000000000..bd1a89efd3 Binary files /dev/null and b/resources/images/tokens/XAUR.png differ diff --git a/resources/images/tokens/XAUR@2x.png b/resources/images/tokens/XAUR@2x.png new file mode 100644 index 0000000000..122d9684e7 Binary files /dev/null and b/resources/images/tokens/XAUR@2x.png differ diff --git a/resources/images/tokens/XAUR@3x.png b/resources/images/tokens/XAUR@3x.png new file mode 100644 index 0000000000..5537b8d932 Binary files /dev/null and b/resources/images/tokens/XAUR@3x.png differ diff --git a/resources/images/tokens/XPA.png b/resources/images/tokens/XPA.png new file mode 100644 index 0000000000..58b3ec5e69 Binary files /dev/null and b/resources/images/tokens/XPA.png differ diff --git a/resources/images/tokens/XPA@2x.png b/resources/images/tokens/XPA@2x.png new file mode 100644 index 0000000000..459bf310b2 Binary files /dev/null and b/resources/images/tokens/XPA@2x.png differ diff --git a/resources/images/tokens/XPA@3x.png b/resources/images/tokens/XPA@3x.png new file mode 100644 index 0000000000..fe8bbc0c44 Binary files /dev/null and b/resources/images/tokens/XPA@3x.png differ diff --git a/resources/images/tokens/XRL.png b/resources/images/tokens/XRL.png new file mode 100644 index 0000000000..bbd747ed11 Binary files /dev/null and b/resources/images/tokens/XRL.png differ diff --git a/resources/images/tokens/XRL@2x.png b/resources/images/tokens/XRL@2x.png new file mode 100644 index 0000000000..c69df2550b Binary files /dev/null and b/resources/images/tokens/XRL@2x.png differ diff --git a/resources/images/tokens/XRL@3x.png b/resources/images/tokens/XRL@3x.png new file mode 100644 index 0000000000..f1fe62b55c Binary files /dev/null and b/resources/images/tokens/XRL@3x.png differ diff --git a/resources/images/tokens/XUC.png b/resources/images/tokens/XUC.png new file mode 100644 index 0000000000..2a41837037 Binary files /dev/null and b/resources/images/tokens/XUC.png differ diff --git a/resources/images/tokens/XUC@2x.png b/resources/images/tokens/XUC@2x.png new file mode 100644 index 0000000000..383d3cfda4 Binary files /dev/null and b/resources/images/tokens/XUC@2x.png differ diff --git a/resources/images/tokens/XUC@3x.png b/resources/images/tokens/XUC@3x.png new file mode 100644 index 0000000000..9ad1d15526 Binary files /dev/null and b/resources/images/tokens/XUC@3x.png differ diff --git a/resources/images/tokens/ZRX.png b/resources/images/tokens/ZRX.png new file mode 100644 index 0000000000..5a0ccfcb0c Binary files /dev/null and b/resources/images/tokens/ZRX.png differ diff --git a/resources/images/tokens/ZRX@2x.png b/resources/images/tokens/ZRX@2x.png new file mode 100644 index 0000000000..328abf6788 Binary files /dev/null and b/resources/images/tokens/ZRX@2x.png differ diff --git a/resources/images/tokens/ZRX@3x.png b/resources/images/tokens/ZRX@3x.png new file mode 100644 index 0000000000..c4ce570484 Binary files /dev/null and b/resources/images/tokens/ZRX@3x.png differ diff --git a/resources/images/tokens/ZSC.png b/resources/images/tokens/ZSC.png new file mode 100644 index 0000000000..f5a60f3cd2 Binary files /dev/null and b/resources/images/tokens/ZSC.png differ diff --git a/resources/images/tokens/ZSC@2x.png b/resources/images/tokens/ZSC@2x.png new file mode 100644 index 0000000000..07954de193 Binary files /dev/null and b/resources/images/tokens/ZSC@2x.png differ diff --git a/resources/images/tokens/ZSC@3x.png b/resources/images/tokens/ZSC@3x.png new file mode 100644 index 0000000000..3fbc99628c Binary files /dev/null and b/resources/images/tokens/ZSC@3x.png differ diff --git a/resources/images/tokens/default.png b/resources/images/tokens/default.png index 40d1d3eff1..0b45475f8a 100644 Binary files a/resources/images/tokens/default.png and b/resources/images/tokens/default.png differ diff --git a/resources/images/tokens/default@2x.png b/resources/images/tokens/default@2x.png new file mode 100644 index 0000000000..54b8e4119d Binary files /dev/null and b/resources/images/tokens/default@2x.png differ diff --git a/resources/images/tokens/default@3x.png b/resources/images/tokens/default@3x.png new file mode 100644 index 0000000000..8ae03b4cc8 Binary files /dev/null and b/resources/images/tokens/default@3x.png differ diff --git a/src/status_im/chat/views/input/input.cljs b/src/status_im/chat/views/input/input.cljs index 975a070864..4645b346a5 100644 --- a/src/status_im/chat/views/input/input.cljs +++ b/src/status_im/chat/views/input/input.cljs @@ -15,39 +15,32 @@ [status-im.chat.views.input.suggestions :as suggestions] [status-im.chat.views.input.validation-messages :as validation-messages] [status-im.ui.components.animation :as anim] - [status-im.ui.components.react :refer [view - animated-view - text - icon - scroll-view - text-input - touchable-highlight - dismiss-keyboard!]] + [status-im.ui.components.react :as react] [status-im.ui.components.icons.vector-icons :as vi] [status-im.i18n :as i18n] [status-im.utils.platform :as platform])) (defn command-view [first? command] - [touchable-highlight {:on-press #(dispatch [:select-chat-input-command command nil])} - [view - [text {:style (style/command first?) - :font :roboto-mono} + [react/touchable-highlight {:on-press #(dispatch [:select-chat-input-command command nil])} + [react/view + [react/text {:style (style/command first?) + :font :roboto-mono} (chat-utils/command-name command)]]]) (defview commands-view [] [all-commands-responses [:get-available-commands-responses] show-suggestions? [:show-suggestions?]] - [view style/commands-root - [view style/command-list-icon-container - [touchable-highlight {:on-press #(dispatch [:show-suggestions])} - [view style/commands-list-icon + [react/view style/commands-root + [react/view style/command-list-icon-container + [react/touchable-highlight {:on-press #(dispatch [:show-suggestions])} + [react/view style/commands-list-icon (if show-suggestions? [vi/icon :icons/close] [vi/icon :icons/commands-list])]]] - [scroll-view {:horizontal true - :showsHorizontalScrollIndicator false - :keyboardShouldPersistTaps :always} - [view style/commands + [react/scroll-view {:horizontal true + :showsHorizontalScrollIndicator false + :keyboardShouldPersistTaps :always} + [react/view style/commands (for [[index command] (map-indexed vector all-commands-responses)] ^{:key (str "command-" index)} [command-view (= index 0) command])]]]) @@ -59,7 +52,7 @@ input-focused? (subscribe [:get-current-chat-ui-prop :input-focused?]) input-ref (atom nil)] (fn [{:keys [set-layout-height-fn set-container-width-fn height single-line-input?]}] - [text-input + [react/text-input {:ref #(when % (dispatch [:set-chat-ui-props {:input-ref %}]) (reset! input-ref %)) @@ -105,11 +98,11 @@ (defn- invisible-input [{:keys [set-layout-width-fn value]}] (let [input-text (subscribe [:chat :input-text])] - [text {:style style/invisible-input-text - :on-layout #(let [w (-> (.-nativeEvent %) - (.-layout) - (.-width))] - (set-layout-width-fn w))} + [react/text {:style style/invisible-input-text + :on-layout #(let [w (-> (.-nativeEvent %) + (.-layout) + (.-width))] + (set-layout-width-fn w))} (or @input-text "")])) (defn- input-helper [_] @@ -129,7 +122,7 @@ (= (count real-args) 1) (input-model/text-ends-with-space? input)) (get-in command [:command :params 1 :placeholder]))] - [text {:style (style/input-helper-text width)} + [react/text {:style (style/input-helper-text width)} placeholder])))))) (defn get-options [type] @@ -147,25 +140,25 @@ (fn [{:keys [command-width container-width]}] (when (get-in @command [:command :sequential-params]) (let [{:keys [placeholder hidden type]} (get-in @command [:command :params @arg-pos])] - [text-input (merge {:ref #(dispatch [:set-chat-ui-props {:seq-input-ref %}]) - :style (style/seq-input-text command-width container-width) - :default-value (or @seq-arg-input-text "") - :on-change-text #(do (dispatch [:set-chat-seq-arg-input-text %]) - (dispatch [:load-chat-parameter-box (:command @command)]) - (dispatch [:set-chat-ui-props {:validation-messages nil}])) - :placeholder placeholder - :accessibility-label :chat-request-input - :blur-on-submit false - :editable (not @sending-in-progress?) - :on-focus #(dispatch [:set-chat-ui-props {:show-emoji? false}]) - :on-submit-editing (fn [] - (when-not (or (str/blank? @seq-arg-input-text) - (get-in @command [:command :hide-send-button])) - (dispatch [:send-seq-argument])) - (js/setTimeout - #(dispatch [:chat-input-focus :seq-input-ref]) - 100))} - (get-options type))]))))) + [react/text-input (merge {:ref #(dispatch [:set-chat-ui-props {:seq-input-ref %}]) + :style (style/seq-input-text command-width container-width) + :default-value (or @seq-arg-input-text "") + :on-change-text #(do (dispatch [:set-chat-seq-arg-input-text %]) + (dispatch [:load-chat-parameter-box (:command @command)]) + (dispatch [:set-chat-ui-props {:validation-messages nil}])) + :placeholder placeholder + :accessibility-label :chat-request-input + :blur-on-submit false + :editable (not @sending-in-progress?) + :on-focus #(dispatch [:set-chat-ui-props {:show-emoji? false}]) + :on-submit-editing (fn [] + (when-not (or (str/blank? @seq-arg-input-text) + (get-in @command [:command :hide-send-button])) + (dispatch [:send-seq-argument])) + (js/setTimeout + #(dispatch [:chat-input-focus :seq-input-ref]) + 100))} + (get-options type))]))))) (defn input-view [_] (let [component (r/current-component) @@ -179,7 +172,7 @@ (fn [{:keys [anim-margin single-line-input?]}] (let [{:keys [width height container-width]} (r/state component) command @command] - [animated-view {:style (style/input-root height anim-margin)} + [react/animated-view {:style (style/input-root height anim-margin)} [invisible-input {:set-layout-width-fn set-layout-width-fn}] [basic-text-input {:set-layout-height-fn set-layout-height-fn :set-container-width-fn set-container-width-fn @@ -190,19 +183,19 @@ [seq-input {:command-width width :container-width container-width}] (if-not command - [touchable-highlight + [react/touchable-highlight {:on-press #(do (dispatch [:toggle-chat-ui-props :show-emoji?]) - (dismiss-keyboard!))} - [view + (react/dismiss-keyboard!))} + [react/view [vi/icon :icons/smile {:container-style style/input-emoji-icon}]]] (when-not single-line-input? - [touchable-highlight + [react/touchable-highlight {:on-press #(do (dispatch [:set-chat-input-text nil]) (dispatch [:set-chat-input-metadata nil]) (dispatch [:set-chat-ui-props {:result-box nil :validation-messages nil}]) (dispatch [:clear-seq-arguments]))} - [view style/input-clear-container + [react/view style/input-clear-container [vi/icon :icons/close]]]))]))}))) (defview input-container [{:keys [anim-margin]}] @@ -213,7 +206,7 @@ result-box [:get-current-chat-ui-prop :result-box]] (let [single-line-input? (:singleLineInput result-box) {:keys [hide-send-button sequential-params]} (:command selected-command)] - [view style/input-container + [react/view style/input-container [input-view {:anim-margin anim-margin :single-line-input? single-line-input?}] (if (:actions result-box) @@ -222,17 +215,17 @@ (or (not selected-command) (some #{:complete :less-than-needed} [command-completion])) (not hide-send-button)) - [touchable-highlight {:on-press #(if sequential-params - (do - (when-not (str/blank? seq-arg-input-text) - (dispatch [:send-seq-argument])) - (js/setTimeout - (fn [] (dispatch [:chat-input-focus :seq-input-ref])) - 100)) - (dispatch [:send-current-message]))} - [view {:style style/send-message-container - :accessibility-label :send-message-button} - [icon :arrow_top style/send-message-icon]]]))]))) + [react/touchable-highlight {:on-press #(if sequential-params + (do + (when-not (str/blank? seq-arg-input-text) + (dispatch [:send-seq-argument])) + (js/setTimeout + (fn [] (dispatch [:chat-input-focus :seq-input-ref])) + 100)) + (dispatch [:send-current-message]))} + [react/view {:style style/send-message-container + :accessibility-label :send-message-button} + [react/icon :arrow_top style/send-message-icon]]]))]))) (defn container [] (let [margin (subscribe [:chat-input-margin]) @@ -267,18 +260,18 @@ :reagent-render (fn [] - [view style/input-container-view + [react/view style/input-container-view [parameter-box/parameter-box-view] [result-box/result-box-view] [suggestions/suggestions-view] [validation-messages/validation-messages-view] - [view {:style (style/root @margin) - :on-layout #(let [h (-> (.-nativeEvent %) - (.-layout) - (.-height))] - (when (> h 0) - (dispatch [:set-chat-ui-props {:input-height h}])))} - [animated-view {:style (style/container container-anim-margin bottom-anim-margin)} + [react/view {:style (style/root @margin) + :on-layout #(let [h (-> (.-nativeEvent %) + (.-layout) + (.-height))] + (when (> h 0) + (dispatch [:set-chat-ui-props {:input-height h}])))} + [react/animated-view {:style (style/container container-anim-margin bottom-anim-margin)} (when (str/blank? @input-text) [commands-view]) [input-container {:anim-margin anim-margin}]] diff --git a/src/status_im/data_store/realm/accounts.cljs b/src/status_im/data_store/realm/accounts.cljs index c714bd35cb..cd96790685 100644 --- a/src/status_im/data_store/realm/accounts.cljs +++ b/src/status_im/data_store/realm/accounts.cljs @@ -1,19 +1,23 @@ (ns status-im.data-store.realm.accounts (:require [status-im.data-store.realm.core :as realm])) -(defn get-all [] - (realm/get-all realm/base-realm :account)) - (defn get-all-as-list [] - (->> (get-all) + (->> (realm/get-all realm/base-realm :account) realm/js-object->clj + (map #(update % :settings realm/deserialize)) (mapv #(realm/fix-map % :networks :id)))) + (defn get-by-address [address] - (realm/fix-map (realm/get-one-by-field-clj realm/base-realm :account :address address) - :networks :id)) + (-> (realm/get-one-by-field-clj realm/base-realm :account :address address) + (update :settings realm/deserialize) + (realm/fix-map :networks :id))) + +(defn- create-account-fn [account update?] + #(realm/create realm/base-realm :account account update?)) (defn save [account update?] (realm/write realm/base-realm - (let [account' (realm/fix-map->vec account :networks)] - #(realm/create realm/base-realm :account account' update?)))) + (-> (realm/fix-map->vec account :networks) + (update :settings realm/serialize) + (create-account-fn update?)))) \ No newline at end of file diff --git a/src/status_im/data_store/realm/core.cljs b/src/status_im/data_store/realm/core.cljs index 9fc82ba9a4..652d074493 100644 --- a/src/status_im/data_store/realm/core.cljs +++ b/src/status_im/data_store/realm/core.cljs @@ -127,11 +127,15 @@ (comp vec vals)) (def reader (transit/reader :json)) +(def writer (transit/writer :json)) + +(defn serialize [o] (transit/write writer o)) +(defn deserialize [o] (try (transit/read reader o) (catch :default e nil))) (defn- internal-convert [js-object] (->> js-object (.stringify js/JSON) - (transit/read reader) + deserialize walk/keywordize-keys)) (defn js-object->clj diff --git a/src/status_im/data_store/realm/schemas/base/core.cljs b/src/status_im/data_store/realm/schemas/base/core.cljs index 911b5702b9..6f15ae0d76 100644 --- a/src/status_im/data_store/realm/schemas/base/core.cljs +++ b/src/status_im/data_store/realm/schemas/base/core.cljs @@ -2,7 +2,8 @@ (:require [status-im.data-store.realm.schemas.base.v1.core :as v1] [status-im.data-store.realm.schemas.base.v2.core :as v2] [status-im.data-store.realm.schemas.base.v3.core :as v3] - [status-im.data-store.realm.schemas.base.v4.core :as v4])) + [status-im.data-store.realm.schemas.base.v4.core :as v4] + [status-im.data-store.realm.schemas.base.v5.core :as v5])) ; put schemas ordered by version (def schemas [{:schema v1/schema @@ -16,4 +17,7 @@ :migration v3/migration} {:schema v4/schema :schemaVersion 4 - :migration v4/migration}]) + :migration v4/migration} + {:schema v5/schema + :schemaVersion 5 + :migration v5/migration}]) \ No newline at end of file diff --git a/src/status_im/data_store/realm/schemas/base/v5/account.cljs b/src/status_im/data_store/realm/schemas/base/v5/account.cljs new file mode 100644 index 0000000000..1d979c167c --- /dev/null +++ b/src/status_im/data_store/realm/schemas/base/v5/account.cljs @@ -0,0 +1,29 @@ +(ns status-im.data-store.realm.schemas.base.v5.account + (:require [taoensso.timbre :as log])) + +(def schema {:name :account + :primaryKey :address + :properties {:address :string + :public-key :string + :updates-public-key {:type :string + :optional true} + :updates-private-key {:type :string + :optional true} + :name {:type :string :optional true} + :phone {:type :string :optional true} + :email {:type :string :optional true} + :status {:type :string :optional true} + :debug? {:type :bool :default false} + :photo-path :string + :signing-phrase {:type :string} + :last-updated {:type :int :default 0} + :signed-up? {:type :bool + :default false} + :network :string + :networks {:type :list + :objectType :network} + :settings {:type :string}}}) + + +(defn migration [old-realm new-realm] + (log/debug "migrating account schema v5")) diff --git a/src/status_im/data_store/realm/schemas/base/v5/core.cljs b/src/status_im/data_store/realm/schemas/base/v5/core.cljs new file mode 100644 index 0000000000..6fd316421d --- /dev/null +++ b/src/status_im/data_store/realm/schemas/base/v5/core.cljs @@ -0,0 +1,13 @@ +(ns status-im.data-store.realm.schemas.base.v5.core + (:require [status-im.data-store.realm.schemas.base.v4.network :as network] + [status-im.data-store.realm.schemas.base.v5.account :as account] + [taoensso.timbre :as log])) + +(def schema [network/schema + account/schema]) + +(defn migration [old-realm new-realm] + (log/debug "migrating v5 base database: " old-realm new-realm) + (account/migration old-realm new-realm)) + + diff --git a/src/status_im/translations/en.cljs b/src/status_im/translations/en.cljs index 4407bb9cfe..31f6a40feb 100644 --- a/src/status_im/translations/en.cljs +++ b/src/status_im/translations/en.cljs @@ -302,6 +302,7 @@ :wallet-add-asset "Add asset" :wallet-total-value "Total value" :wallet-settings "Wallet settings" + :wallet-manage-assets "Manage Assets" :signing-phrase-description "Sign the transaction by entering your password. Make sure that the words above match your secret signing phrase" :wallet-insufficient-funds "Insufficient funds" :wallet-my-token "My {{symbol}}" diff --git a/src/status_im/ui/components/common/common.cljs b/src/status_im/ui/components/common/common.cljs index fd399ebd4d..60b327cb6d 100644 --- a/src/status_im/ui/components/common/common.cljs +++ b/src/status_im/ui/components/common/common.cljs @@ -70,5 +70,5 @@ [vector-icons/icon :icons/network {:color :white}]] [react/text {:style (styles/network-text text-color)} (if (ethereum/testnet? network-id) - (i18n/label :t/testnet-text {:testnet (get-in ethereum/chain-ids [network-id :name] "Unknown")}) + (i18n/label :t/testnet-text {:testnet (get-in ethereum/chains [network-id :name] "Unknown")}) (i18n/label :t/mainnet-text))]]])) diff --git a/src/status_im/ui/components/list/views.cljs b/src/status_im/ui/components/list/views.cljs index 1394abb87a..71c628d65d 100644 --- a/src/status_im/ui/components/list/views.cljs +++ b/src/status_im/ui/components/list/views.cljs @@ -51,11 +51,10 @@ [vi/icon icon (merge icon-opts {:style lst/item-icon})]]) (defn item-image - ([source] (item-image source nil)) - ([source style] - [rn/view {:style style} - [rn/image {:source source - :style lst/item-image}]])) + [{:keys [source style]}] + [rn/view {:style style} + [rn/image {:source source + :style lst/item-image}]]) (defn item-primary [primary] diff --git a/src/status_im/ui/screens/accounts/db.cljs b/src/status_im/ui/screens/accounts/db.cljs index e61afb3dc9..b46efd8861 100644 --- a/src/status_im/ui/screens/accounts/db.cljs +++ b/src/status_im/ui/screens/accounts/db.cljs @@ -18,6 +18,7 @@ (spec/def :account/status (spec/nilable string?)) (spec/def :account/network (spec/nilable string?)) (spec/def :account/networks (spec/nilable :networks/networks)) +(spec/def :account/settings (spec/nilable (spec/map-of keyword? any?))) (spec/def :account/phone (spec/nilable string?)) (spec/def :account/signing-phrase :global/not-empty-string) @@ -27,7 +28,7 @@ :opt-un [:account/debug? :account/status :account/last-updated :account/updates-private-key :account/updates-public-key :account/email :account/signed-up? :account/network - :account/phone :account/networks])) + :account/phone :account/networks :account/settings])) (spec/def :accounts/accounts (spec/nilable (spec/map-of :account/address :accounts/account))) diff --git a/src/status_im/ui/screens/accounts/events.cljs b/src/status_im/ui/screens/accounts/events.cljs index 26130a58b2..0628153082 100644 --- a/src/status_im/ui/screens/accounts/events.cljs +++ b/src/status_im/ui/screens/accounts/events.cljs @@ -97,7 +97,7 @@ :network network :networks networks :address address)] - {:db (assoc-in db [:accounts/accounts address] enriched-account) + {:db (assoc-in db [:accounts/accounts address] enriched-account) ::save-account enriched-account})) ;; TODO(janherich) we have this handler here only because of the tests, refactor/improve tests ASAP @@ -120,7 +120,8 @@ :updates-public-key (:public keypair) :updates-private-key (:private keypair) :photo-path (identicon pubkey) - :signing-phrase signing-phrase}] + :signing-phrase signing-phrase + :settings {:wallet {:visible-tokens {:testnet #{:STT} :mainnet #{:SNT}}}}}] (log/debug "account-created") (when-not (str/blank? pubkey) (-> (add-account db account) @@ -157,6 +158,12 @@ {:db (assoc-in db [:accounts/accounts id] new-account) ::save-account new-account}))) +(defn update-wallet-settings [{:accounts/keys [current-account-id accounts] :as db} settings] + (let [new-account (-> (get accounts current-account-id) + (assoc :settings settings))] + {:db (assoc-in db [:accounts/accounts current-account-id] new-account) + ::save-account new-account})) + (defn account-update "Takes effects (containing :db) + new account fields, adds all effects necessary for account update." [{{:accounts/keys [accounts current-account-id] :as db} :db :as fx} new-account-fields] diff --git a/src/status_im/ui/screens/contacts/events.cljs b/src/status_im/ui/screens/contacts/events.cljs index e64d32cb7e..2544e0bee1 100644 --- a/src/status_im/ui/screens/contacts/events.cljs +++ b/src/status_im/ui/screens/contacts/events.cljs @@ -272,11 +272,11 @@ (fn [{:keys [db all-contacts]} _] (let [contacts-list (map #(vector (:whisper-identity %) %) all-contacts) contacts (into {} contacts-list)] - {:db (update db :contacts/contacts #(merge contacts %)) + {:db (update db :contacts/contacts #(merge contacts %))}))) ;; TODO (yenda) this mapv was dispatching useless events, fixed but is it necessary if ;; it was dispatching useless events before with nil ;;:dispatch-n (mapv (fn [[_ contact]] [:watch-contact contact]) contacts) - }))) + (register-handler-fx :add-contacts diff --git a/src/status_im/ui/screens/db.cljs b/src/status_im/ui/screens/db.cljs index 355e19272b..210520fe91 100644 --- a/src/status_im/ui/screens/db.cljs +++ b/src/status_im/ui/screens/db.cljs @@ -33,7 +33,6 @@ :discover-current-dapp {} :tags [] :sync-state :done - :wallet {} :wallet.transactions constants/default-wallet-transactions :wallet-selected-asset {} :prices {} diff --git a/src/status_im/ui/screens/events.cljs b/src/status_im/ui/screens/events.cljs index 22166e8a3d..37bcf42ad7 100644 --- a/src/status_im/ui/screens/events.cljs +++ b/src/status_im/ui/screens/events.cljs @@ -19,6 +19,7 @@ status-im.ui.screens.qr-scanner.events status-im.ui.screens.wallet.events status-im.ui.screens.wallet.send.events + status-im.ui.screens.wallet.settings.events status-im.ui.screens.wallet.transactions.events status-im.ui.screens.wallet.choose-recipient.events [re-frame.core :refer [dispatch reg-fx reg-cofx] :as re-frame] @@ -228,7 +229,7 @@ (register-handler-fx :initialize-db (fn [{{:keys [status-module-initialized? status-node-started? - network-status network _] + network-status network] :networks/keys [networks] :or {network (get app-db :network)}} :db} _] {::init-store nil diff --git a/src/status_im/ui/screens/subs.cljs b/src/status_im/ui/screens/subs.cljs index 4be548051c..f0d89fae23 100644 --- a/src/status_im/ui/screens/subs.cljs +++ b/src/status_im/ui/screens/subs.cljs @@ -10,9 +10,10 @@ status-im.ui.screens.group.subs status-im.ui.screens.profile.subs status-im.ui.screens.wallet.subs - status-im.ui.screens.wallet.transactions.subs - status-im.ui.screens.wallet.send.subs status-im.ui.screens.wallet.request.subs + status-im.ui.screens.wallet.send.subs + status-im.ui.screens.wallet.settings.subs + status-im.ui.screens.wallet.transactions.subs status-im.ui.screens.wallet.wallet-list.subs status-im.ui.screens.wallet.assets.subs status-im.ui.screens.network-settings.subs diff --git a/src/status_im/ui/screens/views.cljs b/src/status_im/ui/screens/views.cljs index 4aa053977c..5dc1a3e9e6 100644 --- a/src/status_im/ui/screens/views.cljs +++ b/src/status_im/ui/screens/views.cljs @@ -39,6 +39,7 @@ [status-im.ui.screens.wallet.choose-recipient.views :refer [choose-recipient]] [status-im.ui.screens.wallet.request.views :refer [request-transaction]] [status-im.ui.screens.wallet.wallet-list.views :refer [wallet-list-screen]] + [status-im.ui.screens.wallet.settings.views :as wallet-settings] [status-im.ui.screens.wallet.transactions.views :as wallet-transactions] [status-im.ui.screens.wallet.send.transaction-sent.views :refer [transaction-sent transaction-sent-modal]] [status-im.ui.screens.wallet.assets.views :as wallet-assets] @@ -125,6 +126,7 @@ :recover-modal recover-modal :contact-list-modal contact-list-modal :wallet-transactions-filter wallet-transactions/filter-history + :wallet-settings-assets wallet-settings/manage-assets :wallet-send-transaction-modal send-transaction-modal :wallet-transaction-sent-modal transaction-sent-modal (throw (str "Unknown modal view: " modal-view)))] diff --git a/src/status_im/ui/screens/wallet/assets/subs.cljs b/src/status_im/ui/screens/wallet/assets/subs.cljs index dd6b08712e..3618ee86c4 100644 --- a/src/status_im/ui/screens/wallet/assets/subs.cljs +++ b/src/status_im/ui/screens/wallet/assets/subs.cljs @@ -4,5 +4,5 @@ ;; TODO(goranjovic) - the USD value is currently hardcoded, will be replaced with actual data ;; in a different PR (re-frame/reg-sub :token-balance - (fn [db] - (assoc-in db [:wallet-selected-asset :usd-value] 0.93))) \ No newline at end of file + (fn [{:keys [wallet-selected-asset]}] + (assoc wallet-selected-asset :usd-value 0.93))) \ No newline at end of file diff --git a/src/status_im/ui/screens/wallet/assets/views.cljs b/src/status_im/ui/screens/wallet/assets/views.cljs index 83a4a33e57..de8c14bfa1 100644 --- a/src/status_im/ui/screens/wallet/assets/views.cljs +++ b/src/status_im/ui/screens/wallet/assets/views.cljs @@ -33,7 +33,7 @@ [react/view components.styles/flex [react/view {:style assets.styles/total-balance-container} [react/view {:style assets.styles/total-balance} - [react/text {:style assets.styles/total-balance-value} (money/to-fixed (money/token->unit (or amount 0) decimals))] + [react/text {:style assets.styles/total-balance-value} (money/to-fixed (money/token->unit (or amount (money/bignumber 0)) decimals))] [react/text {:style assets.styles/total-balance-currency} symbol]] [react/view {:style assets.styles/value-variation} [react/text {:style assets.styles/value-variation-title} diff --git a/src/status_im/ui/screens/wallet/components/views.cljs b/src/status_im/ui/screens/wallet/components/views.cljs index d582283344..e89d3797ac 100644 --- a/src/status_im/ui/screens/wallet/components/views.cljs +++ b/src/status_im/ui/screens/wallet/components/views.cljs @@ -104,7 +104,7 @@ [react/text {:style (merge styles/wallet-value styles/wallet-value-amount) :number-of-lines 1 :ellipsize-mode :tail} - (str (money/wei->ether balance))] + (str (money/wei->ether (:ETH balance)))] ;; TODO(jeluard) update based on currency selected [react/text {:style styles/wallet-value} (i18n/label :t/eth)]] [react/text {:style styles/wallet-value} diff --git a/src/status_im/ui/screens/wallet/events.cljs b/src/status_im/ui/screens/wallet/events.cljs index d415c3c779..fd0d3f5e2d 100644 --- a/src/status_im/ui/screens/wallet/events.cljs +++ b/src/status_im/ui/screens/wallet/events.cljs @@ -56,9 +56,9 @@ (reg-fx :get-tokens-balance - (fn [{:keys [web3 symbols network account-id success-event error-event]}] + (fn [{:keys [web3 symbols chain-id account-id success-event error-event]}] (doseq [symbol symbols] - (let [contract (:address (tokens/token-for (ethereum/network network) symbol))] + (let [contract (:address (tokens/token-for chain-id symbol))] (get-token-balance {:web3 web3 :contract contract :account-id account-id @@ -94,7 +94,7 @@ :get-tokens-balance {:web3 web3 :account-id current-account-id :symbols symbols - :network network + :chain-id (ethereum/network->chain-id network) :success-event :update-token-balance-success :error-event :update-token-balance-fail} :get-prices {:from "ETH" diff --git a/src/status_im/ui/screens/wallet/main/views.cljs b/src/status_im/ui/screens/wallet/main/views.cljs index 0f7ab4457b..7c8d4aab9e 100644 --- a/src/status_im/ui/screens/wallet/main/views.cljs +++ b/src/status_im/ui/screens/wallet/main/views.cljs @@ -1,6 +1,6 @@ (ns status-im.ui.screens.wallet.main.views (:require-macros [status-im.utils.views :refer [defview letsubs]]) - (:require [re-frame.core :as rf] + (:require [re-frame.core :as re-frame] [status-im.ui.components.button.view :as btn] [status-im.ui.components.drawer.view :as drawer] [status-im.ui.components.list.views :as list] @@ -25,7 +25,7 @@ (utils/show-popup "TODO" "Not implemented yet!")) (defn toolbar-title [] - [react/touchable-highlight {:on-press #(rf/dispatch [:navigate-to :wallet-list])} + [react/touchable-highlight {:on-press #(re-frame/dispatch [:navigate-to :wallet-list])} [react/view {:style styles/toolbar-title-container} [react/text {:style styles/toolbar-title-text :font :toolbar-title @@ -39,7 +39,7 @@ (def transaction-history-action {:icon :icons/transaction-history :icon-opts (merge {:color :white :style {:viewBox "-108 65.9 24 24"}} styles/toolbar-icon) - :handler #(rf/dispatch [:navigate-to :transactions-history])}) + :handler #(re-frame/dispatch [:navigate-to :transactions-history])}) (defn toolbar-view [] [toolbar/toolbar {:style wallet.styles/toolbar} @@ -47,7 +47,9 @@ [toolbar/content-wrapper [toolbar-title]] [toolbar/actions - [(assoc (act/opts [{:text (i18n/label :t/wallet-settings) :value show-not-implemented!}]) :icon-opts {:color :white}) + [(assoc (act/opts [{:text (i18n/label :t/wallet-manage-assets) + :value #(re-frame/dispatch [:navigate-to-modal :wallet-settings-assets])}]) + :icon-opts {:color :white}) transaction-history-action]]]) (defn main-section [usd-value change syncing? error-message] @@ -66,11 +68,11 @@ [components/change-display change]] [react/view {:style (merge button.styles/buttons-container styles/buttons)} [btn/button {:disabled? syncing? - :on-press #(rf/dispatch [:navigate-to :wallet-send-transaction]) + :on-press #(re-frame/dispatch [:navigate-to :wallet-send-transaction]) :style (button.styles/button-bar :first) :text-style styles/main-button-text} (i18n/label :t/wallet-send)] [btn/button {:disabled? syncing? - :on-press #(rf/dispatch [:navigate-to :wallet-request-transaction]) + :on-press #(re-frame/dispatch [:navigate-to :wallet-request-transaction]) :style (button.styles/button-bar :other) :text-style styles/main-button-text} (i18n/label :t/wallet-request)] [btn/button {:disabled? true :style (button.styles/button-bar :last) :text-style styles/main-button-text} @@ -87,16 +89,15 @@ (defn render-asset [{:keys [name symbol icon decimals amount] :as asset}] (if name ;; If no 'name' then this the dummy value used to render `add-asset` - [list/touchable-item #(rf/dispatch [:navigate-to-asset asset]) + [list/touchable-item #(re-frame/dispatch [:navigate-to-asset asset]) [react/view [list/item - (let [{:keys [source style]} icon] - [list/item-image source style]) + [list/item-image icon] [react/view {:style styles/asset-item-value-container} [react/text {:style styles/asset-item-value :number-of-lines 1 :ellipsize-mode :tail} - (money/to-fixed (money/token->unit (or amount 0) decimals))] + (money/to-fixed (money/token->unit (or amount (money/bignumber 0)) decimals))] [react/text {:style styles/asset-item-currency :uppercase? true :number-of-lines 1} @@ -105,22 +106,23 @@ [add-asset])) (defn tokens-for [network] - (get tokens/all (ethereum/network network))) + (get tokens/all (ethereum/network->chain-id network))) -(defn asset-section [network balance prices-loading? balance-loading?] - (let [tokens (tokens-for network) +(defn asset-section [network balance visible-tokens prices-loading? balance-loading?] + (let [tokens (filter #(contains? visible-tokens (:symbol %)) (tokens-for network)) assets (map #(assoc % :amount (get balance (:symbol %))) (concat [tokens/ethereum] (when config/erc20-enabled? tokens)))] [react/view {:style styles/asset-section} [react/text {:style styles/asset-section-title} (i18n/label :t/wallet-assets)] [list/flat-list {:data assets ;; TODO(jeluard) Reenable once we `add-an-asset` story is flecthed out ;; (concat assets [{}]) ;; Extra map triggers rendering for add-asset :render-fn render-asset - :on-refresh #(rf/dispatch [:update-wallet (when config/erc20-enabled? (map :symbol tokens))]) + :on-refresh #(re-frame/dispatch [:update-wallet (when config/erc20-enabled? (map :symbol tokens))]) :refreshing (boolean (or prices-loading? balance-loading?))}]])) (defview wallet [] (letsubs [network [:network] balance [:balance] + visible-tokens [:wallet.settings/visible-tokens] portfolio-value [:portfolio-value] portfolio-change [:portfolio-change] prices-loading? [:prices-loading?] @@ -131,4 +133,4 @@ [toolbar-view] [react/view components.styles/flex [main-section portfolio-value portfolio-change syncing? error-message] - [asset-section network balance prices-loading? balance-loading?]]])) + [asset-section network balance visible-tokens prices-loading? balance-loading?]]])) diff --git a/src/status_im/ui/screens/wallet/settings/events.cljs b/src/status_im/ui/screens/wallet/settings/events.cljs new file mode 100644 index 0000000000..ee39cc5a50 --- /dev/null +++ b/src/status_im/ui/screens/wallet/settings/events.cljs @@ -0,0 +1,20 @@ +(ns status-im.ui.screens.wallet.settings.events + (:require [status-im.ui.screens.accounts.events :as accounts] + [status-im.utils.ethereum.core :as ethereum] + [status-im.utils.handlers :as handlers])) + +(defn- toggle-checked [ids id checked?] + (if checked? + (conj (or ids #{}) id) + (disj ids id))) + +(handlers/register-handler-fx + :wallet.settings/toggle-visible-token + (fn [{{:keys [network] :accounts/keys [current-account-id] :as db} :db} [_ symbol checked?]] + (let [chain-id (ethereum/network->chain-id network) + path [:accounts/accounts current-account-id :settings] + settings (get-in db path) + new-settings (update-in settings [:wallet :visible-tokens chain-id] #(toggle-checked % symbol checked?))] + (-> db + (assoc-in path new-settings) + (accounts/update-wallet-settings new-settings))))) \ No newline at end of file diff --git a/src/status_im/ui/screens/wallet/settings/subs.cljs b/src/status_im/ui/screens/wallet/settings/subs.cljs new file mode 100644 index 0000000000..df3bfd055b --- /dev/null +++ b/src/status_im/ui/screens/wallet/settings/subs.cljs @@ -0,0 +1,11 @@ +(ns status-im.ui.screens.wallet.settings.subs + (:require [re-frame.core :as re-frame] + [status-im.utils.ethereum.core :as ethereum])) + +;; A set of visible-tokens for current network +(re-frame/reg-sub :wallet.settings/visible-tokens + :<- [:network] + :<- [:get-current-account] + (fn [[network current-account]] + (let [chain-id (ethereum/network->chain-id network)] + (get-in current-account [:settings :wallet :visible-tokens chain-id])))) \ No newline at end of file diff --git a/src/status_im/ui/screens/wallet/settings/views.cljs b/src/status_im/ui/screens/wallet/settings/views.cljs new file mode 100644 index 0000000000..e60e77294a --- /dev/null +++ b/src/status_im/ui/screens/wallet/settings/views.cljs @@ -0,0 +1,31 @@ +(ns status-im.ui.screens.wallet.settings.views + (:require-macros [status-im.utils.views :refer [defview letsubs]]) + (:require [re-frame.core :as re-frame] + [status-im.ui.components.list.views :as list] + [status-im.ui.components.react :as react] + [status-im.ui.components.toolbar.view :as toolbar] + [status-im.i18n :as i18n] + [status-im.utils.ethereum.core :as ethereum] + [status-im.utils.ethereum.tokens :as tokens] + [status-im.ui.components.styles :as components.styles])) + +(defn- render-token [{:keys [symbol name icon]} visible-tokens] + [list/item + [list/item-image icon] + [list/item-content + [list/item-primary name] + [list/item-secondary symbol]] + [list/item-checkbox {:checked? (contains? visible-tokens (keyword symbol)) + :on-value-change #(re-frame/dispatch [:wallet.settings/toggle-visible-token (keyword symbol) %])}]]) + +(defview manage-assets [] + (letsubs [network [:network] + visible-tokens [:wallet.settings/visible-tokens]] + (let [chain-id (ethereum/network->chain-id network)] + [react/view components.styles/flex + [toolbar/toolbar {} + [toolbar/nav-clear-text (i18n/label :t/done)] + [toolbar/content-title (i18n/label :t/wallet-assets)]] + [react/view {:style components.styles/flex} + [list/flat-list {:data (tokens/tokens-for chain-id) + :render-fn #(render-token % visible-tokens)}]]]))) \ No newline at end of file diff --git a/src/status_im/utils/ethereum/core.cljs b/src/status_im/utils/ethereum/core.cljs index f988dae255..95340ecb3f 100644 --- a/src/status_im/utils/ethereum/core.cljs +++ b/src/status_im/utils/ethereum/core.cljs @@ -1,16 +1,17 @@ (ns status-im.utils.ethereum.core (:require [clojure.string :as string] - [status-im.js-dependencies :as dependencies])) + [status-im.js-dependencies :as dependencies] + [status-im.utils.money :as money])) ;; IDs standardized in https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md#list-of-chain-ids -(def chain-ids +(def chains {:mainnet {:id 1 :name "Mainnet"} :ropsten {:id 3 :name "Ropsten"} :rinkeby {:id 4 :name "Rinkeby"}}) (defn chain-id [k] - (get-in chain-ids [k :id])) + (get-in chains [k :id])) (defn testnet? [id] (contains? #{(chain-id :ropsten) (chain-id :rinkeby)} id)) @@ -23,7 +24,7 @@ address (str hex-prefix address)))) -(defn network [network] +(defn network->chain-id [network] (when network (keyword (string/replace network "_rpc" "")))) @@ -42,6 +43,9 @@ (defn int->hex [i] (.toHex dependencies/Web3.prototype i)) +(defn hex->bignumber [s] + (money/bignumber (if (= s "0x") 0 s))) + (defn zero-pad-64 [s] (str (apply str (drop (count s) (repeat 64 "0"))) s)) diff --git a/src/status_im/utils/ethereum/erc20.cljs b/src/status_im/utils/ethereum/erc20.cljs index eef214c75e..5f0863c442 100644 --- a/src/status_im/utils/ethereum/erc20.cljs +++ b/src/status_im/utils/ethereum/erc20.cljs @@ -30,12 +30,12 @@ (defn total-supply [web3 contract cb] (ethereum/call web3 (ethereum/call-params contract "totalSupply()") - #(cb %1 (ethereum/hex->int %2)))) + #(cb %1 (ethereum/hex->bignumber %2)))) (defn balance-of [web3 contract address cb] (ethereum/call web3 (ethereum/call-params contract "balanceOf(address)" address) - #(cb %1 (ethereum/hex->int %2)))) + #(cb %1 (ethereum/hex->bignumber %2)))) (defn transfer [web3 contract address value cb] (ethereum/call web3 @@ -55,4 +55,4 @@ (defn allowance [web3 contract owner-address spender-address cb] (ethereum/call web3 (ethereum/call-params contract "allowance(address, address)" owner-address spender-address) - #(cb %1 (ethereum/hex->int %2)))) \ No newline at end of file + #(cb %1 (ethereum/hex->bignumber %2)))) \ No newline at end of file diff --git a/src/status_im/utils/ethereum/macros.clj b/src/status_im/utils/ethereum/macros.clj index 31bcdfca37..391b1612aa 100644 --- a/src/status_im/utils/ethereum/macros.clj +++ b/src/status_im/utils/ethereum/macros.clj @@ -2,13 +2,9 @@ (:require [clojure.string :as string] [clojure.java.io :as io])) -(def tokens-folder "./resources/images/tokens/") - -(def default-icon-path (str tokens-folder "default.png")) - (defn icon-path [symbol] - (let [s (str "./resources/images/tokens/" (string/lower-case (name symbol)) ".png")] + (let [s (str "./resources/images/tokens/" (name symbol) ".png")] (if (.exists (io/file s)) `(js/require ~s) `(js/require "./resources/images/tokens/default.png")))) diff --git a/src/status_im/utils/ethereum/tokens.cljs b/src/status_im/utils/ethereum/tokens.cljs index 027fdd9b6d..9717a6b423 100644 --- a/src/status_im/utils/ethereum/tokens.cljs +++ b/src/status_im/utils/ethereum/tokens.cljs @@ -1,5 +1,6 @@ (ns status-im.utils.ethereum.tokens - (:require [status-im.ui.components.styles :as styles]) + (:require [status-im.ui.components.styles :as styles] + [status-im.utils.ethereum.core :as ethereum]) (:require-macros [status-im.utils.ethereum.macros :refer [resolve-icons]])) (defn- asset-border [color] @@ -14,10 +15,358 @@ (def all {:mainnet (resolve-icons - [{:name "Status Network Token" - :symbol :SNT - :decimals 18 - :address "0x744d70FDBE2Ba4CF95131626614a1763DF805B9E"}]) + [{:symbol :EOS + :name "EOS" + :address "0x86fa049857e0209aa7d9e616f7eb3b3b78ecfdb0" + :decimals 18} + {:symbol :OMG + :name "OmiseGo" + :address "0xd26114cd6EE289AccF82350c8d8487fedB8A0C07" + :decimals 18} + {:symbol :PPT + :name "Populous" + :address "0xd4fa1460f537bb9085d22c7bccb5dd450ef28e3a" + :decimals 18} + {:symbol :REP + :name "Augur" + :address "0xe94327d07fc17907b4db788e5adf2ed424addff6" + :decimals 18} + {:symbol :POWR + :name "PowerLedger" + :address "0x595832f8fc6bf59c85c527fec3740a1b7a361269" + :decimals 18} + {:symbol :PAY + :name "TenXPay" + :address "0xB97048628DB6B661D4C2aA833e95Dbe1A905B280" + :decimals 18} + {:symbol :VERI + :name "Veros" + :address "0xedbaf3c5100302dcdda53269322f3730b1f0416d" + :decimals 18} + {:symbol :GNT + :name "Golem Network Token" + :address "0xa74476443119A942dE498590Fe1f2454d7D4aC0d" + :decimals 18} + {:symbol :SALT + :name "Salt" + :address "0x4156D3342D5c385a87D264F90653733592000581" + :decimals 8} + {:symbol :BNB + :name "BNB" + :address "0xB8c77482e45F1F44dE1745F52C74426C631bDD52" + :decimals 18} + {:symbol :BAT + :name "Basic Attention Token" + :address "0x0d8775f648430679a709e98d2b0cb6250d2887ef" + :decimals 18} + {:symbol :KNC + :name "Kyber Network Crystal" + :address "0xdd974d5c2e2928dea5f71b9825b8b646686bd200" + :decimals 18} + {:symbol :DGD + :name "DGD" + :address "0xe0b7927c4af23765cb51314a0e0521a9645f0e2a" + :decimals 9} + {:symbol :AE + :name "Aeternity" + :address "0x5ca9a71b1d01849c0a95490cc00559717fcf0d1d" + :decimals 18} + {:symbol :TRX + :name "Tronix" + :address "0xf230b790e05390fc8295f4d3f60332c93bed42e2" + :decimals 6} + {:symbol :ETHOS + :name "Ethos" + :address "0x5af2be193a6abca9c8817001f45744777db30756" + :decimals 8} + {:symbol :RDN + :name "Raiden Token" + :address "0x255aa6df07540cb5d3d297f0d0d4d84cb52bc8e6" + :decimals 18} + {:symbol :SNT + :name "Status Network Token" + :address "0x744d70fdbe2ba4cf95131626614a1763df805b9e" + :decimals 18} + {:symbol :SNGLS + :name "SingularDTV" + :address "0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009" + :decimals 0} + {:symbol :GNO + :name "Gnosis Token" + :address "0x6810e776880c02933d47db1b9fc05908e5386b96" + :decimals 18} + {:symbol :ATMChain + :name "Attention Token of Media" + :address "0x9B11EFcAAA1890f6eE52C6bB7CF8153aC5d74139" + :decimals 8} + {:symbol :STORJ + :name "StorjToken" + :address "0xb64ef51c888972c908cfacf59b47c1afbc0ab8ac" + :decimals 8} + {:symbol :ADX + :name "AdEx" + :address "0x4470bb87d77b963a013db939be332f927f2b992e" + :decimals 4} + {:symbol :FUN + :name "FunFair" + :address "0x419d0d8bdd9af5e606ae2232ed285aff190e711b" + :decimals 8} + {:symbol :CVC + :name "Civic" + :address "0x41e5560054824ea6b0732e656e3ad64e20e94e45" + :decimals 8} + {:symbol :ICN + :name "ICONOMI" + :address "0x888666CA69E0f178DED6D75b5726Cee99A87D698" + :decimals 18} + {:symbol :WTC + :name "Walton Token" + :address "0xb7cb1c96db6b22b0d3d9536e0108d062bd488f74" + :decimals 18} + {:symbol :BTM + :name "Bytom" + :address "0xcb97e65f07da24d46bcdd078ebebd7c6e6e3d750" + :decimals 8} + {:symbol :ZRX + :name "0x Protocol Token" + :address "0xe41d2489571d322189246dafa5ebde1f4699f498" + :decimals 18} + {:symbol :BNT + :name "Bancor Network Token" + :address "0x1f573d6fb3f13d689ff844b4ce37794d79a7ff1c" + :decimals 18} + {:symbol :MTL + :name "Metal" + :address "0xF433089366899D83a9f26A773D59ec7eCF30355e" + :decimals 8} + {:symbol :PPP + :name "PayPie" + :address "0xc42209aCcC14029c1012fB5680D95fBd6036E2a0" + :decimals 18} + {:symbol :LINK + :name "ChainLink Token" + :address "0x514910771af9ca656af840dff83e8264ecf986ca" + :decimals 18} + {:symbol :KIN + :name "Kin" + :address "0x818fc6c2ec5986bc6e2cbf00939d90556ab12ce5" + :decimals 18} + {:symbol :ANT + :name "Aragon Network Token" + :address "0x960b236A07cf122663c4303350609A66A7B288C0" + :decimals 18} + {:symbol :MGO + :name "MobileGo Token" + :address "0x40395044Ac3c0C57051906dA938B54BD6557F212" + :decimals 8} + {:symbol :MCO + :name "Monaco" + :address "0xb63b606ac810a52cca15e44bb630fd42d8d1d83d" + :decimals 8} + {:symbol :LRC + :name "LoopringCoin" + :address "0xEF68e7C694F40c8202821eDF525dE3782458639f" + :decimals 18} + {:symbol :ZSC + :name "Zeus Shield Token" + :address "0x7A41e0517a5ecA4FdbC7FbebA4D4c47B9fF6DC63" + :decimals 18} + {:symbol :DATA + :name "Streamr DATAcoin" + :address "0x0cf0ee63788a0849fe5297f3407f701e122cc023" + :decimals 18} + {:symbol :RCN + :name "Ripio Credit Network Token" + :address "0xf970b8e36e23f7fc3fd752eea86f8be8d83375a6" + :decimals 9} + {:symbol :WINGS + :name "WINGS" + :address "0x667088b212ce3d06a1b553a7221E1fD19000d9aF" + :decimals 18} + {:symbol :EDG + :name "Edgeless" + :address "0x08711d3b02c8758f2fb3ab4e80228418a7f8e39c" + :decimals 0} + {:symbol :MLN + :name "Melon Token" + :address "0xBEB9eF514a379B997e0798FDcC901Ee474B6D9A1" + :decimals 18} + {:symbol :MDA + :name "Moeda Loyalty Points" + :address "0x51db5ad35c671a87207d88fc11d593ac0c8415bd" + :decimals 18} + {:symbol :PLR + :name "PILLAR" + :address "0xe3818504c1b32bf1557b16c238b2e01fd3149c17" + :decimals 18} + {:symbol :Centra + :name "Centra Token" + :address "0x96A65609a7B84E8842732DEB08f56C3E21aC6f8a" + :decimals 18} + {:symbol :QRL + :name "QRL" + :address "0x697beac28b09e122c4332d163985e8a73121b97f" + :decimals 8} + {:symbol :MOD + :name "Modum Token" + :address "0x957c30ab0426e0c93cd8241e2c60392d08c6ac8e" + :decimals 0} + {:symbol :TAAS + :name "Token-as-a-Service" + :address "0xe7775a6e9bcf904eb39da2b68c5efb4f9360e08c" + :decimals 6} + {:symbol :GRID + :name "GRID+ Token" + :address "0x12b19d3e2ccc14da04fae33e63652ce469b3f2fd" + :decimals 12} + {:symbol :SAN + :name "SANtiment network token" + :address "0x7c5a0ce9267ed19b22f8cae653f198e3e8daf098" + :decimals 18} + {:symbol :SNM + :name "SONM Token" + :address "0x983f6d60db79ea8ca4eb9968c6aff8cfa04b3c63" + :decimals 18} + {:symbol :REQ + :name "Request Token" + :address "0x8f8221afbb33998d8584a2b05749ba73c37a938a" + :decimals 18} + {:symbol :SUB + :name "Substratum" + :address "0x12480e24eb5bec1a9d4369cab6a80cad3c0a377a" + :decimals 2} + {:symbol :MANA + :name "Decentraland MANA" + :address "0x0f5d2fb29fb7d3cfee444a200298f468908cc942" + :decimals 18} + {:symbol :AST + :name "AirSwap Token" + :address "0x27054b13b1b798b345b591a4d22e6562d47ea75a" + :decimals 4} + {:symbol :R + :name "R Token" + :address "0x48f775efbe4f5ece6e0df2f7b5932df56823b990" + :decimals 0} + {:symbol :1ST + :name "FirstBlood Token" + :address "0xaf30d2a7e90d7dc361c8c4585e9bb7d2f6f15bc7" + :decimals 18} + {:symbol :CFI + :name "Cofoundit" + :address "0x12fef5e57bf45873cd9b62e9dbd7bfb99e32d73e" + :decimals 2} + {:symbol :ENG + :name "Enigma" + :address "0xf0ee6b27b759c9893ce4f094b49ad28fd15a23e4" + :decimals 8} + {:symbol :AMB + :name "Amber Token" + :address "0x4dc3643dbc642b72c158e7f3d2ff232df61cb6ce" + :decimals 18} + {:symbol :XPA + :name "XPlay Token" + :address "0x90528aeb3a2b736b780fd1b6c478bb7e1d643170" + :decimals 18} + {:symbol :OTN + :name "Open Trading Network" + :address "0x881ef48211982d01e2cb7092c915e647cd40d85c" + :decimals 18} + {:symbol :TRST + :name "Trustcoin" + :address "0xcb94be6f13a1182e4a4b6140cb7bf2025d28e41b" + :decimals 6} + {:symbol :TKN + :name "Monolith TKN" + :address "0xaaaf91d9b90df800df4f55c205fd6989c977e73a" + :decimals 8} + {:symbol :RHOC + :name "RHOC" + :address "0x168296bb09e24a88805cb9c33356536b980d3fc5" + :decimals 8} + {:symbol :TGT + :name "Target Coin" + :address "0xac3da587eac229c9896d919abc235ca4fd7f72c1" + :decimals 0} + {:symbol :EVX + :name "Everex" + :address "0xf3db5fa2c66b7af3eb0c0b782510816cbe4813b8" + :decimals 4} + {:symbol :ICOS + :name "ICOS" + :address "0x014b50466590340d41307cc54dcee990c8d58aa8" + :decimals 6} + {:symbol :DNT + :name "district0x Network Token" + :address "0x0abdace70d3790235af448c88547603b945604ea" + :decimals 18} + {:symbol :DCN + :name "Dentacoin" + :address "0x08d32b0da63e2C3bcF8019c9c5d849d7a9d791e6" + :decimals 0} + {:symbol :EDO + :name "Eidoo Token" + :address "0xced4e93198734ddaff8492d525bd258d49eb388e" + :decimals 18} + {:symbol :CSNO + :name "BitDice" + :address "0x29d75277ac7f0335b2165d0895e8725cbf658d73" + :decimals 8} + {:symbol :COB + :name "Cobinhood Token" + :address "0xb2f7eb1f2c37645be61d73953035360e768d81e6" + :decimals 18} + {:symbol :ENJ + :name "Enjin Coin" + :address "0xf629cbd94d3791c9250152bd8dfbdf380e2a3b9c" + :decimals 18} + {:symbol :AVT + :name "AVT" + :address "0x0d88ed6e74bbfd96b831231638b66c05571e824f" + :decimals 18} + {:symbol :TIME + :name "TIME" + :address "0x6531f133e6deebe7f2dce5a0441aa7ef330b4e53" + :decimals 18} + {:symbol :CND + :name "Cindicator Token" + :address "0xd4c435f5b09f855c3317c8524cb1f586e42795fa" + :decimals 18} + {:symbol :STX + :name "STOX" + :address "0x006BeA43Baa3f7A6f765F14f10A1a1b08334EF45" + :decimals 18} + {:symbol :XAUR + :name "Xaurum" + :address "0x4DF812F6064def1e5e029f1ca858777CC98D2D81" + :decimals 8} + {:symbol :VIB + :name "Vibe" + :address "0x2c974b2d0ba1716e644c1fc59982a89ddd2ff724" + :decimals 18} + {:symbol :PRG + :name "PRG" + :address "0x7728dFEF5aBd468669EB7f9b48A7f70a501eD29D" + :decimals 6} + {:symbol :DPY + :name "Delphy" + :address "0x6c2adc2073994fb2ccc5032cc2906fa221e9b391" + :decimals 18} + {:symbol :CDT + :name "CoinDash Token" + :address "0x2fe6ab85ebbf7776fee46d191ee4cea322cecf51" + :decimals 18} + {:symbol :TNT + :name "Tierion Network Token" + :address "0x08f5a9235b08173b7569f83645d2c7fb55e8ccd8" + :decimals 8} + {:symbol :DRT + :name "DomRaider Token" + :address "0x9af4f26941677c706cfecf6d3379ff01bb85d5ab" + :decimals 8} + {:symbol :ROL + :name "Dice" + :address "0x2e071D2966Aa7D8dECB1005885bA1977D6038A65" + :decimals 16}]) :testnet (resolve-icons [{:name "Status Test Token" @@ -25,5 +374,8 @@ :decimals 18 :address "0xc55cf4b03948d7ebc8b9e8bad92643703811d162"}])}) +(defn tokens-for [chain-id] + (get all chain-id)) + (defn token-for [chain-id symbol] - (some #(if (= symbol (:symbol %)) %) (get all chain-id))) \ No newline at end of file + (some #(if (= symbol (:symbol %)) %) (tokens-for chain-id))) \ No newline at end of file diff --git a/src/status_im/utils/money.cljs b/src/status_im/utils/money.cljs index 1fe551dc6e..8be33c2fd5 100644 --- a/src/status_im/utils/money.cljs +++ b/src/status_im/utils/money.cljs @@ -49,7 +49,7 @@ (dependencies/Web3.prototype.toDecimal (normalize s)) (catch :default err nil)))) -(defn from-decimal [n] (str "1" (string/join (repeat n "0")))) +(defn from-decimal [n] (when n (str "1" (string/join (repeat n "0"))))) (def eth-units {:wei (bignumber "1") diff --git a/test/cljs/status_im/test/data_store/realm/core.cljs b/test/cljs/status_im/test/data_store/realm/core.cljs new file mode 100644 index 0000000000..e9aa04d2f8 --- /dev/null +++ b/test/cljs/status_im/test/data_store/realm/core.cljs @@ -0,0 +1,9 @@ +(ns status-im.test.data-store.realm.core + (:require [cljs.test :refer-macros [deftest is]] + [status-im.data-store.realm.core :as core])) + +(deftest serilization + (is (nil? (core/deserialize ""))) + (is (nil? (core/deserialize "giberrish"))) + (is (nil? (core/deserialize nil))) + (is (nil? (core/deserialize (core/serialize nil))))) diff --git a/test/cljs/status_im/test/runner.cljs b/test/cljs/status_im/test/runner.cljs index 8c108b8a5b..3c9f77403e 100644 --- a/test/cljs/status_im/test/runner.cljs +++ b/test/cljs/status_im/test/runner.cljs @@ -3,6 +3,7 @@ [status-im.test.chat.events] [status-im.test.contacts.events] [status-im.test.accounts.events] + [status-im.test.data-store.realm.core] [status-im.test.wallet.events] [status-im.test.wallet.transactions.subs] [status-im.test.wallet.transactions.views] @@ -36,6 +37,7 @@ ;;'status-im.test.contacts.events 'status-im.test.profile.events 'status-im.test.wallet.events + 'status-im.test.data-store.realm.core 'status-im.test.bots.events 'status-im.test.wallet.transactions.subs 'status-im.test.wallet.transactions.views