From b1f8658eec857d0d4d2e3ffbaf4c85d67c86567b Mon Sep 17 00:00:00 2001 From: Oleksandr Sobol Date: Thu, 14 May 2020 20:29:10 +0300 Subject: [PATCH] CWA-212 | created exchange template and exchange template store; added exchange cards to exchange template page; added exchange templates to exchange page; added provider icons to provider picker --- assets/images/2.0x/morph_icon.png | Bin 1741 -> 1552 bytes assets/images/3.0x/morph_icon.png | Bin 2685 -> 2358 bytes assets/images/morph_icon.png | Bin 895 -> 752 bytes lib/main.dart | 6 + lib/router.dart | 20 ++ lib/routes.dart | 1 + .../domain/exchange/exchange_template.dart | 35 ++ lib/src/screens/exchange/exchange_page.dart | 189 ++++------ .../exchange/exchange_template_page.dart | 335 +++++++++++++++++- .../exchange/widgets/exchange_card.dart | 129 +------ .../exchange/widgets/provider_picker.dart | 31 +- lib/src/screens/send/send_page.dart | 2 +- lib/src/stores/exchange/exchange_store.dart | 14 +- .../exchange_template_store.dart | 40 +++ 14 files changed, 537 insertions(+), 265 deletions(-) create mode 100644 lib/src/domain/exchange/exchange_template.dart create mode 100644 lib/src/stores/exchange_template/exchange_template_store.dart diff --git a/assets/images/2.0x/morph_icon.png b/assets/images/2.0x/morph_icon.png index a897a73b13895ce7d93f1ddedd502e8a27d1886e..0cc2c3bac7a7a019232a14021e6984b00df28cff 100644 GIT binary patch delta 1485 zcmV;;1v2{04Ui0wReuGgNklNLj9I$57RsycJA+ce$V?OgAE{rc+*EF4G}cRX@5}A;H?XKG`i5C3vDu) zOoN$%8BIeu4K2ia+G)tAL5}Id$nbt*TN>>y#7>5rQx03hz6{a2d%EZ%w(aqi1Ym?^$L^((&p%H;PI)W$O2!bCgPn^3Xq z7>SwtCaK(WoQw=TBGbkA_&8~(I7MFady8yKt}@SN!>gfr8+*V)Swc!U_xz@@6}xjj z#Xq<2!`=)HK0tZV7ig^c4rH8Qjm`!mnDNE>2-gRQwtwSxnU{S0_zBbzCFr|5$i)K} z`l9CePCOqP1bfi?cR$|EJA^+vZyC~>uT{Z6$YMN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WiPs=*9l3eTr!oZBohzm+@R?VewUCc9iIVA!!`8mh+bUSMaIcZlL!xR zMrc{a3!m5p^WRJik78J|v;AZ!&$AL*B(i;R2{TnB56ts7;pbRF17W@EaHdAb;(x7p Wn3>rPb&LQ2002ovP6b4+LSTZLo-8N; diff --git a/assets/images/3.0x/morph_icon.png b/assets/images/3.0x/morph_icon.png index db98d49da84ddf84192f2d49f622b766254a126c..bdf991cf2b05ca8b2e4dadefbf69e20d5ad8fdbb 100644 GIT binary patch delta 2297 zcmVFIM;A(WU zVC-oitsJfbIhi!^q+E>#(sIyU@Mf*4;$5Fg-W)wOVSomBvz^zXb7*!|Or)ig6u|_Q z7@-m(oHX+BIe*+oI24Yw&&j#xLM5sML=I2_v*u`4*=~fMbB%Zn?BUH(%2Ox@OUMpO zc+W$TCdoQ!-fXuu@J!O>#&%8x#G9iPb;$1MbCf^_!g0=`n?nKd=G?*EqLmg*Fbkj18}7+njmGa!!`=A(w?DAB za3gL{sle%zlGe0^ml%?C5)g0B5jgwh7ta5Q-OumC!4JO0g1puE;$Q>Zg|nxdv2fZN z?0xN19IgKmUma?cT8$&E*nVLL0f|vdviQ`qmp|fDqJ-~1A3uvlGoHZn8{S1*Ydc(- zkM`E%j(?2hsQ=9T4-F0p!su~B9j#tsuSND6R0t=IdBXHW>-XlS7F7O!2db97g!VQb zu10%1k8MxAjndicaO%W4>+*3~BM=zW!_j6`I32XeUO-Muml-)D;n%~b!?G7Q?nTLr zCvl$GxT|pSk4sovu@mbmYH;adYlpr`1<7)ocYn|#tANPDLdb-5Dx6!UC3IT8zqTGl zS&!oI$KRp5q2_-d(VAzUcoVIyZ5{f;Bd*0w34`T!L4{*g6k82aRQR4WbByHj#$&&r zbk2Ibv-2PkHoAp|Z%znN_CVd&lKnSNO@ObTHxytkiwFV|opYL!Ek`6oAap=q$-bsv ze}6~$J=J*T@!k0AQY$VeAHMq~=4P$H@doJ>gycBL${P)Zq*=_&qCsg&xAgKdB0Jyl zfi7MA3!7H%#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P%x>iNO zk@yO8&3_6cfyU%LdCWYcpRBTB?hyGl7@l?=#;X@w_`AGgCqZyJxjDTM(|VGfX1y_%GAnk|?f%fQkv3kIH96MuZK`$Je<4B_)fb8`KS(0fr#vtzQ^ zA+3HygxG&H7DlrR|4}Z#ODndPZpt0CH~rQJ&=#YcyU&lKCHriz(Trade.boxName, encryptionKey: tradesBoxKey); final walletInfoSource = await Hive.openBox(WalletInfo.boxName); final templates = await Hive.openBox