From ebe64b79b80d7ccff3ab6239b18307e7b247a424 Mon Sep 17 00:00:00 2001 From: Stefan Popov Date: Sun, 7 Jul 2024 16:19:11 +0200 Subject: [PATCH] Release 1.38.3 (#1456) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixes * Bond and nominate in one action * Fix keys * SORA parachain bridge (#1231) * add sora parachain for network selection * prepare connector for refactoring * refactoring SubNetworksConnector * wip outgoing reducer * fix network fee * parachain tx tracking * refactoring connector * add sora parachain icon example * add scrollbar to networks list * sora parachain history restoration * small fixes * sonar refactoring * update short names * improve sub bridge history restoration * restore refunded transactions * improve history restoration parachain part * [fix] clean history only for selected network * revert env.json * refactoring history restoration * update wallet 1.26.3 * up version * set detectEthereumProvider arg mustBeMetaMask to true * review update * Show swap distribution (#1191) * add Distribution component * update distribution * update distribution component * path line style * popover position * distribution fiat difference * update markup * fix css with small screen width * Fix bridge issues (#1232) * restore history for relaychain & sora parachain in one flow * refactoring sub history restoration * fix transfer min & max amounts * update add token button * dont remove walletconnect session after provider change * fix evm address check * fix loLowerCase check * Whitelist usage rationalization (#1234) * refactoring whitelist usage; fix explore demeter colums * add DataRowSkeleton component * fix price alert price change * Fixes * SORA parachain bridge (#1231) * add sora parachain for network selection * prepare connector for refactoring * refactoring SubNetworksConnector * wip outgoing reducer * fix network fee * parachain tx tracking * refactoring connector * add sora parachain icon example * add scrollbar to networks list * sora parachain history restoration * small fixes * sonar refactoring * update short names * improve sub bridge history restoration * restore refunded transactions * improve history restoration parachain part * [fix] clean history only for selected network * revert env.json * refactoring history restoration * update wallet 1.26.3 * up version * set detectEthereumProvider arg mustBeMetaMask to true * review update * Show swap distribution (#1191) * add Distribution component * update distribution * update distribution component * path line style * popover position * distribution fiat difference * update markup * fix css with small screen width * Fix bridge issues (#1232) * restore history for relaychain & sora parachain in one flow * refactoring sub history restoration * fix transfer min & max amounts * update add token button * dont remove walletconnect session after provider change * fix evm address check * fix loLowerCase check * Whitelist usage rationalization (#1234) * refactoring whitelist usage; fix explore demeter colums * add DataRowSkeleton component * fix price alert price change * tokens page fallback & wallet 1.26.5 (#1238) * fix prices precision on chart (#1240) * Fix chart Y axis for assets with very low price (#1241) * set mix & max for y axis * add hideOverlap for y axis * Fix release 1.26.0 issues (#1239) * iOS dirty hack * Recenter alert dialog + fix menu + price autofocus * Re-center select node dialog and fix header styles * Fix styles * Fix issues based on test env PR * Fix About reactivity * Fix iOS double click issues * Add auto focus for editable/new nodes from select node dialog * Increase alerts limit * Upd wallet version * Update zh_CN.json * Update zh_CN.json * Update AlertList.vue --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> Co-authored-by: Nikita Polyakov <53777036+Nikita-Polyakov@users.noreply.github.com> * Bridge sub account & token autoselects (#1242) * update chart precision * bridge token autoselect * autoselect sub account address * transfer token-select-button styles from mixin * add object.freeze --------- Co-authored-by: Stefan Popov * fix bridge max value precision (#1244) * Fix bridge fees issues (#1246) * update soraNetworkFee always * check xcm fee in max button * Some fixes * Chart, Bridge, Wallet, ADAR fixes (#1247) * update SubNetwork usage * disable bridge switch btn on loading state, calc type chart limits * update wallet 1.27.0 * remove resolutions * Update ValidatorsDialog.vue * Fix * Xor commission fix * Add vote on survey and new banner (#1251) * Add new banner * Add vote on survey & move SORA mobile link * Add survey image --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Fixes * Fixes * Fixes * Translation fix * Editable fiat amount in input (#1250) * use token-input in bridge, remove outdates styles * add fiat input * improve fiat value calculations * fiat input fixes * Fix colors * Fix * Fixes * Fixes * Fix * Remove imports * fix chart current price (#1256) * refactoring * remove lib from resolutions * fix retry button visibility (#1254) * fix retry button visibility * Update package.json * return 1.27.0 version --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Sidebar hide button (#1249) * add collapse button to sidebar * add tooltip to icon * sidebar hover effect * update translations * update menu css * update wallet * Improve Eth bridge fees calculation (#1257) * fix retry button visibility * refactoring sign methods * calc incoming fee * transfer method to eth bridge utils * update BridgeInitMixin * add fallback calculation * update amount to calculate fee * fix sonar issues * Fix rewards destination * Fixes * Fixes * Revert env.json * Fixes * Remove tooltip * Translation fix * Remove utils * Rename function * Fix translation file * Remove all rewards info * Fix styles * Staking badge click (#1258) * Validators search input fix (#1262) * Staking badge click * Validators search input fix * Fix release issues 1.27 (#1261) * Make mx button hidden when hide balances is enabled * Fix issues --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Refactor staking (#1263) * Refactor * Fix validators list style * Fix commission format * Fix change validators disable * Fix styles * Fixes * Use stakingStakers * Fix staking lang keys * Update json files * Update messages.ts * Add comments * Update zh_CN.json * Update env.json --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> Co-authored-by: RDMStreet * Add staking routing in menu (#1265) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Correct staking balance formatting (#1267) * Correct staking balance formatting * Remove unused import * Add 6M filter for stats page (#1270) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Add sora card maintenance page (#1269) (#1271) * Add maintenance page for SORA Card * Hide crowdloan ad --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Improve zh_CN keys (#1272) * Fix zh_CN keys * Update package.json --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Update dojoProductType * [Bridge] Add Polkadot bridge support (#1277) * add polkadot consts usage * update config & icon * set network fee 0.02 DOT * subquery endpoint as in master * fix ui issue with sora hash for incomng tx * add polkadot xcm fee * update polkadot network fee * soraCard:false * Subsquid prod endpoint * [BRIDGE] check for asset valid address on bridge contract (#1283) * check for asset valid address on bridge contract * remove console.log * Update wallet * Use 1000 page size for subsquid * Prepare prod config (#1285) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Fix import * fix ss58 check (#1289) * set kusama incoming xcm fee 0.01KSM (#1290) * set kusama incoming xcm fee 0.01KSM * Update package.json --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * order book (#1089) * prework * prework * book list * prework for table popover * establish vuex store * write basic logic * create order history widget * add tables * start book widget * Update BookWidget.vue * make market widget * resolve conflicts * Update OrderBook.vue * embed charts * make api working * style table * filter books * make filters to amount and price * remove debug info * Update BuySell.vue * fix price constraints * Update Jenkinsfile * make aggregation * Update Jenkinsfile * add checks * make update * update * make sell market order * Update OpenOrders.vue * add change * fix * add market order, spread checks, confirm dialog * add confirm cancel dialog * fix dark mode * improve dark mode * hide native scrolls * add tooltips & improve UX * improve responsive * improve ux * fixes * improve mobile, tablet, desktop responsibility * fix market order * fix input/output * fix * fix errors * make huge screen usable * add missing data * Update OpenOrders.vue * add translations * upgrade lib & add translations * forbid cancelling when book is stopped * dynamic fee * enable market trades widget * hide market trades * fixes * allow whole row click * add pagination * Order book indexer requests (#1223) * wip queries * account orders request * add order book subscription * refactoring deals * update types & subscription * add orders table data & subscription to order book updates * fix order query * fix all orders table * add order books stats to popover * update stats on popover opening * add deals to market trades * fix deals * refactoring subscriptions & data architecture * add userLimitOrders type * update wallet * add last deal price * format buySell price * update table amount * order table component * fix filled * refactoring order table & mixins * add scaler * allow whitelist only * update orders request * fix cancel * fix ui issues * fix wallet version 1.26.2 * fix orders sort * fix column * improve adaptive ui * implement steps * Update OrderTable.vue * fix wiping out * fix * add checks * hide debug info * hide native scrollbar * improve adaptive design * up version * remove mixin * fix * Update index.ts * Update BookWidget.vue * fix not updating book issue * make small adjustments * align values * align book values * fixes * Update BookWidget.vue * fix input wiping out * round up styles * fixes * fixes * add margins * Update OrderBook.vue * Update package.json * fix assetsDataTable * fix scrollbar in orders table * Order book price chart (#1237) * transfer asset price query from wallet * add order book data to chart * prepare subscription * set chart subscription * fix sorting bug * fix max button fills wrong value * Update BuySell.vue * fix precision * Update BuySell.vue * warn user when error in input & aggregation logic * fill price when click on book * Update BuySell.vue * fixes * add feature flag & refactoring * hide expiry date for market * refactor * fix * [OrderBook] add volume chart (#1248) * add volume to dataset * add volume example * add color to bars * improve tooltip & labels localization * build spec depends on volume support * use filters from line chart * remove commented code * add typings * fix typings * Update orderBook.ts * add slider for amount * remove corridor checks * Update env.json * fix on slider * Update BuySell.vue * Update TokenInput.vue * resolve conflicts * Update _mixins.scss * inject slider * Update HistoryOrderWidget.vue * Revert "Merge branch 'develop' into feature/order-book" This reverts commit d02e1a65e7d2db20b07cd8055b2e171a61bee639, reversing changes made to 1f58ed6efe9c8d8d1cd54765382be1e5e26fc766. * fix chart * fix fee on place order * fix disappearance * Update BookWidget.vue * fix sonar issues * fix sonar * fix * fixes * fix issues * add slider focus * fix css values * move collapse logic to store * enable aggregation * trim when fiat is input * resolve conflicts * Spot limitations (#1255) * add consts * Update BuySell.vue * Update package.json * fix * add locked to transaction details * Update TransactionDetails.vue * customise prework * resolve typings * add limit for single price * Update package.json * bump --------- Co-authored-by: Vladimir Shelkovnikov <99356504+C4tWithShell@users.noreply.github.com> * Order book refactoring (#1281) * refactoring BookWidget * book widget methods refactoring * BuySell refactoring * HistoryOrderWidget refactoring --------- Co-authored-by: Rustem * fix * recalculate orders & remove possible overlap * Update BuySell.vue * Update BookWidget.vue * fix with precision * fix tab freeze when switching * fix * Update BookWidget.vue * fix langs switch * fix for input with different locales * turn card off * Update deps * Update yarn.lock * Bump version * Fix lint warnings * Blur fiat el during slider usage for TokenInput * Update AppMenu.vue * Fix icons * Update index.ts * Fix shadow * Remove unused styles * Fix lint issues * Update BookWidget.vue * Update BuySell.vue * Update CustomisePage.vue * Resolve linter issues * Add duration in days for ordertable * Improve tables * Fix styles * Remove empty DatePicker * Update HistoryOrderWidget.vue * Restrict autofill from orderbook for mkt * Update index.ts * Fix font * Remove duplicated methods from util --------- Co-authored-by: Nikita Polyakov <53777036+Nikita-Polyakov@users.noreply.github.com> Co-authored-by: Nikita-Polyakov Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> Co-authored-by: Vladimir Shelkovnikov <99356504+C4tWithShell@users.noreply.github.com> * Fix 1.29 release (#1292) * Update dot, ksm nodes * Improve SORA Card maintenance styles --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Update BuySell.vue (#1295) * Single chart filter (#1293) * prework * prework * book list * prework for table popover * establish vuex store * write basic logic * create order history widget * add tables * start book widget * Update BookWidget.vue * make market widget * resolve conflicts * Update OrderBook.vue * embed charts * make api working * style table * filter books * make filters to amount and price * remove debug info * Update BuySell.vue * fix price constraints * Update Jenkinsfile * make aggregation * Update Jenkinsfile * add checks * make update * update * make sell market order * Update OpenOrders.vue * add change * fix * add market order, spread checks, confirm dialog * add confirm cancel dialog * fix dark mode * improve dark mode * hide native scrolls * add tooltips & improve UX * improve responsive * improve ux * fixes * improve mobile, tablet, desktop responsibility * fix market order * fix input/output * fix * fix errors * make huge screen usable * add missing data * Update OpenOrders.vue * add translations * upgrade lib & add translations * forbid cancelling when book is stopped * dynamic fee * enable market trades widget * hide market trades * fixes * allow whole row click * add pagination * Order book indexer requests (#1223) * wip queries * account orders request * add order book subscription * refactoring deals * update types & subscription * add orders table data & subscription to order book updates * fix order query * fix all orders table * add order books stats to popover * update stats on popover opening * add deals to market trades * fix deals * refactoring subscriptions & data architecture * add userLimitOrders type * update wallet * add last deal price * format buySell price * update table amount * order table component * fix filled * refactoring order table & mixins * add scaler * allow whitelist only * update orders request * fix cancel * fix ui issues * fix wallet version 1.26.2 * fix orders sort * fix column * improve adaptive ui * implement steps * Update OrderTable.vue * fix wiping out * fix * add checks * hide debug info * hide native scrollbar * improve adaptive design * up version * remove mixin * fix * Update index.ts * Update BookWidget.vue * fix not updating book issue * make small adjustments * align values * align book values * fixes * Update BookWidget.vue * fix input wiping out * round up styles * fixes * fixes * add margins * Update OrderBook.vue * Update package.json * fix assetsDataTable * fix scrollbar in orders table * Order book price chart (#1237) * transfer asset price query from wallet * add order book data to chart * prepare subscription * set chart subscription * fix sorting bug * fix max button fills wrong value * Update BuySell.vue * fix precision * Update BuySell.vue * warn user when error in input & aggregation logic * fill price when click on book * Update BuySell.vue * fixes * add feature flag & refactoring * hide expiry date for market * refactor * fix * [OrderBook] add volume chart (#1248) * add volume to dataset * add volume example * add color to bars * improve tooltip & labels localization * build spec depends on volume support * use filters from line chart * remove commented code * add typings * fix typings * Update orderBook.ts * add slider for amount * remove corridor checks * Update env.json * fix on slider * Update BuySell.vue * Update TokenInput.vue * resolve conflicts * Update _mixins.scss * inject slider * Update HistoryOrderWidget.vue * Revert "Merge branch 'develop' into feature/order-book" This reverts commit d02e1a65e7d2db20b07cd8055b2e171a61bee639, reversing changes made to 1f58ed6efe9c8d8d1cd54765382be1e5e26fc766. * fix chart * fix fee on place order * fix disappearance * Update BookWidget.vue * fix sonar issues * fix sonar * fix * fixes * fix issues * add slider focus * fix css values * move collapse logic to store * enable aggregation * trim when fiat is input * resolve conflicts * Spot limitations (#1255) * add consts * Update BuySell.vue * Update package.json * fix * add locked to transaction details * Update TransactionDetails.vue * customise prework * resolve typings * add limit for single price * Update package.json * bump --------- Co-authored-by: Vladimir Shelkovnikov <99356504+C4tWithShell@users.noreply.github.com> * Order book refactoring (#1281) * refactoring BookWidget * book widget methods refactoring * BuySell refactoring * HistoryOrderWidget refactoring --------- Co-authored-by: Rustem * fix * recalculate orders & remove possible overlap * Update BuySell.vue * Update BookWidget.vue * fix with precision * fix tab freeze when switching * fix * Update BookWidget.vue * fix langs switch * fix for input with different locales * turn card off * set filters like in candle * set chart animation to false * remove merge conflicts * return default chart type * add order book queries for subsquid * change zoom after filter siwtch * reset zoom on filter tab * refactoring * update types & subsquid requests * update wallet to 1.29.1 --------- Co-authored-by: RustemYuzlibaev Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> Co-authored-by: Vladimir Shelkovnikov <99356504+C4tWithShell@users.noreply.github.com> Co-authored-by: NaghmeMohammadifar <45916098+Naghme98@users.noreply.github.com> * fix (#1296) * Feature/order book translations (#1284) * prework * prework * book list * prework for table popover * establish vuex store * write basic logic * create order history widget * add tables * start book widget * Update BookWidget.vue * make market widget * resolve conflicts * Update OrderBook.vue * embed charts * make api working * style table * filter books * make filters to amount and price * remove debug info * Update BuySell.vue * fix price constraints * Update Jenkinsfile * make aggregation * Update Jenkinsfile * add checks * make update * update * make sell market order * Update OpenOrders.vue * add change * fix * add market order, spread checks, confirm dialog * add confirm cancel dialog * fix dark mode * improve dark mode * hide native scrolls * add tooltips & improve UX * improve responsive * improve ux * fixes * improve mobile, tablet, desktop responsibility * fix market order * fix input/output * fix * fix errors * make huge screen usable * add missing data * Update OpenOrders.vue * add translations * upgrade lib & add translations * forbid cancelling when book is stopped * dynamic fee * enable market trades widget * hide market trades * fixes * allow whole row click * add pagination * Order book indexer requests (#1223) * wip queries * account orders request * add order book subscription * refactoring deals * update types & subscription * add orders table data & subscription to order book updates * fix order query * fix all orders table * add order books stats to popover * update stats on popover opening * add deals to market trades * fix deals * refactoring subscriptions & data architecture * add userLimitOrders type * update wallet * add last deal price * format buySell price * update table amount * order table component * fix filled * refactoring order table & mixins * add scaler * allow whitelist only * update orders request * fix cancel * fix ui issues * fix wallet version 1.26.2 * fix orders sort * fix column * improve adaptive ui * implement steps * Update OrderTable.vue * fix wiping out * fix * add checks * hide debug info * hide native scrollbar * improve adaptive design * up version * remove mixin * fix * Update index.ts * Update BookWidget.vue * fix not updating book issue * make small adjustments * align values * align book values * fixes * Update BookWidget.vue * fix input wiping out * round up styles * fixes * fixes * add margins * Update OrderBook.vue * Update package.json * fix assetsDataTable * fix scrollbar in orders table * Order book price chart (#1237) * transfer asset price query from wallet * add order book data to chart * prepare subscription * set chart subscription * fix sorting bug * fix max button fills wrong value * Update BuySell.vue * fix precision * Update BuySell.vue * warn user when error in input & aggregation logic * fill price when click on book * Update BuySell.vue * fixes * add feature flag & refactoring * hide expiry date for market * refactor * fix * [OrderBook] add volume chart (#1248) * add volume to dataset * add volume example * add color to bars * improve tooltip & labels localization * build spec depends on volume support * use filters from line chart * remove commented code * add typings * fix typings * Update orderBook.ts * add slider for amount * remove corridor checks * Update env.json * fix on slider * Update BuySell.vue * Update TokenInput.vue * resolve conflicts * Update _mixins.scss * inject slider * Update HistoryOrderWidget.vue * Revert "Merge branch 'develop' into feature/order-book" This reverts commit d02e1a65e7d2db20b07cd8055b2e171a61bee639, reversing changes made to 1f58ed6efe9c8d8d1cd54765382be1e5e26fc766. * fix chart * fix fee on place order * fix disappearance * Update BookWidget.vue * fix sonar issues * fix sonar * fix * fixes * fix issues * add slider focus * fix css values * move collapse logic to store * enable aggregation * trim when fiat is input * make translation prework * resolve conflicts * create translations * translations * fix merge issues * embed missing translations * add missing translations * fix * fix ru lang * add order status translations * make room for additional space * Update BuySell.vue * add descriptive message * add descriptive message for all langs * reset * cancel reset when market order --------- Co-authored-by: Nikita Polyakov <53777036+Nikita-Polyakov@users.noreply.github.com> Co-authored-by: Nikita-Polyakov Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Explore order books (#1276) * prepare explore books data * fix issues * update price column * refactoring explore page mixin * add filter to order books query * update wallet 1.28.0 * fix price formatting * pools from indexer * remove unused method * add pool tokens column * rename quoteAsset to targetAsset for search * refactoring queries * refactoring * update translation key & fix tokens page search * Fix explore books sorting (#1299) * fix computed property for table * refactoring * fix changeSort type * Fix release 1.29 (#1294) * Remove unused import * Add notification and loading for stake dialog during TX sign * Fix staking extrinsics notifications and loading states * Fix redeemable VAL -> XOR * Update package.json * Make orderbook open orders reactive & fix cancel orders selection algo * Remove unused staking methods * Fix issue with horizontal & vertical scroll * Update StakingMixin.ts * Update actions.ts * Update OpenOrders.vue * Update OrderTable.vue * Improve styles * Fix sync issues * Fix empty page issues * Fix styles * Add Intl percent formatter * Improve global html styles * Fix scrollbar * Refactor source code for PlaceOrder component * Refactor place order logic * Fix cancel orders logic and styles * Update HistoryOrderWidget.vue * Fix translations for MarketTradesWidget * Fix connect account styles * Fix styles * Remove unused prop * Move user orders subscription to history widget * Update PlaceOrder.vue * Fix issues * Update SelectedTokensRouteMixin.ts * Add dynamic routing for orderbook * Refactor types * Update OrderBook.vue * Improve routes (common states for Swap and Orderbook) * fix translations * fix mismatch on cancel * Update deps --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> Co-authored-by: RustemYuzlibaev * Fix orderbook notifications and orders history (#1300) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Fix 1.29 issues (#1303) * Remove marketing research & add transition * Update wallet * Fix the flickering collapsed menu when hovering on expand button over the status bar --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> Co-authored-by: shlavik * Update AppMenu.vue (#1304) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Fix 1.29.0 issues (#1306) * Fix menu styles * Update AppMenu.vue * Fix click on tooltip for mobile devices * Update PairListPopover.vue * Revert "Update AppMenu.vue" This reverts commit 5147d349b2f15829cd54fd133ab6263d7aa011e3. * Update wallet * Fix styles --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Update subquery endpoint (#1308) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * update wallet 1.29.8 (#1309) * Fix explore menu navigation (#1310) * Fix explore menu navigation * update wallet 1.29.9 --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> Co-authored-by: Nikita-Polyakov * Fix cancel all orders (#1313) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Replace explore tabs with dropdown * Update soramitsuUI.ts * Update Container.vue * Fix selected colors * Update BuySell.vue (#1301) * Update BuySell.vue * handle different side change * reduce watchers --------- Co-authored-by: Stefan Popov Co-authored-by: Nikita Polyakov <53777036+Nikita-Polyakov@users.noreply.github.com> * add missing balance to token (#1315) * Fix bridge tx sign with google & mint\burn translations (#1323) * add beforeSign call * update wallet & translations from localise * fix ts issues * add mint & burn translations * Add KEN distribution page (#1320) * validation refactoring (#1319) * validation refactoring * add generic component * log in * refactor * Update BookWidget.vue * hide scaler * fix zero appearance * remove commented code * improve validation * improve check for unique prices * add multiply translation * replace translation * aggregate conditions * Update en.json (#1327) * Fix ken title (#1330) * Fix KEN title * Enable orderbook on mainnet * Bump version --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * fix (#1331) * fix * add error handling for small balances * move to dev * Staking fixes (#1268) * Staking fixes * Fix * Fixes * Fix * Redeem dialogs * Fixes * Fix subscribeOnCurrentEraTotalStake * Withdraw * Fixes * Some fixes * Countdown * Fix countdown position * Fix countdown calc * Validators list * Sorting * Validator name * Revert env * Change default validators sort * Fixes * Max * focus * Countdown translation * unbondPeriodFormatted fix * Remove comments * Fix colors * Template fixes * Update translations * Fix blackout * Fix input styles * Update EraCountdown.vue * Fix Sonar issues * Fix notification for withdraw operation * Max validators * Validators list style fixes * Remove new stake network fee * Fix styles * Max fix * Update translations * Remove empty translations --------- Co-authored-by: Stefan Popov Co-authored-by: Vladimir Shelkovnikov <99356504+C4tWithShell@users.noreply.github.com> Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * expand total text (#1333) * [Bridge] fix insufficient balance check (#1329) * fix insufficient balance check * remove kusama hardcoded xcm * update Kusama fee to 0.002 KSM * update polkadot treasury fee * Fix orderbook styles * Fix lang --------- Co-authored-by: Rustem Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> Co-authored-by: Stefan Popov * update order book quote subscription (#1335) * [Tech] queries from wallet (#1336) * transfer pools queries * update referrals * update wallet & refactoring * Сhart volume update (#1332) * refactoring fetchData * update chart subscription to fetch last snapshot * update chart tooltip * update chart styles * save zoom level after chart type switch * sonar fixes * Remove unnecessary imports * Fix type * [Tech] update packages (#1337) * update types * update charts libs * update jwt-decode * update sass & package.json node version * update typescript * Max count * Fix SubsquidOrderBooksQuery * Fix chart volume update for XOR (#1348) * fix xor volume update * set interval polling for chart assets updates * fixes after review * update wallet 1.32.3 * deduplicate yarn.lock * Fix Eth bridge tx replacement (#1350) * refactoring eth utils methods * fix replaceable tx tracking * refactoring * Update package.json (#1353) * Update package.json * Update yarn.lock --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Demeter fixes (#1355) * fix selectedPool getter * translations from localise * add calculating text * Fix quote rpc (#1356) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Remove new stake page (#1343) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Add swap last transactions widget (#1342) * add BaseWidget component * replace StatsCard for BaseWidget * create SwapFormWidget * refactoring base widget * wip transactions table * table demo data * update transactions widget data * add links dropdown, improve paddings * update table styles * add fromTimestamp to limit query results * add withParentLoading to ScrollableTable * swap page custom layout * add distribution as widget, style fixes * swap layout fixes * change swap widgets folder structure * fix sonar issues * fix icon hover & dropdown focus * remove fixed table * set dropdown foruc rounded * update table head titles * mixin fix * fix transactions loading * update table column order --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Fix issues after PRs merge (#1360) * Fix * Remove not used styles --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * [Sub Bridge] add ability to select substrate node (#1346) * transfer to liberland * transfer from liberland * fix history fetch * refactoring adapters * update history restoration * change autoselectSubAddress * add asset outgoing minimum amount * update visible min limit * update config to sub network endpoint * multiple endpoints in adapter * update sup network apps & incoming transfer tracking * add props to SelectNodeDialog * simplify NodeErrorMixin * create connection class file * simplify trusted node check * remove nodeConnectionAllowance * remove some nodes getters * move action to class * refactoring connectToNode * transfer wallet init to App.vue * use appConnection for sora nodes * fix node info loading state * use NodesConnection in SubAdapter * sub node dialog demo * update node dialog texts * update network name in select node dialog * refactoring NodesConnection reactivity * simplify adapter * add BridgeNodeIcon * ui node name fixes * ts fixes * remove todo comments * fix failed sub tx status in history * add externalNativeMinBalance * improve connection wait logic * refactoring min deposit usage, add translation keys * check min balance in transferable amount * update bridge apps after reconnect * fix select-network disabled css * update external min balance fetch * hardcode liberland network fee * set dns regexp with exact start * add reload button to node list * refactoring after review * update translations --------- Co-authored-by: Stefan Popov Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Add skeleton to swap distribution widget (#1361) * add distribution skeleton, set tx table columns width * fix distribution sources css * fix flex-cell * return sidebar collapsed css * Update substrate lib --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Fix 1.32 issues (#1363) * Add links to bridge transfer modal (#1362) * add links to modal, update BridgeTransactionMixin * fix sub tx recipientAmount in reducer * account links in BridgeTransactionView * refactoring transaction view links * add node connection allowance timeout * return app align center * remove rococo block explorer url * fix ts issue * refactoring sonar issues * remove isOutgoingType from mixin * remove unused code * Improve bridge icons (#1364) * Add orderbook research link (#1366) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * improve external links (#1367) * Improve bridge sora links (#1370) * improve external links * add tokens.Deposited handler * fix sub blocks left & account formatting * improve sora links * improve sora links & refactoring (#1371) * update network & xcm fees (#1373) * Add ability to hide swap widgets (#1374) * add ability to hide swap widgets * add WidgetsVisibilityModel * Collapsed menu background overlaps neighbor fix * align chart header with swap widget * update customise widget * update translations * style fixes --------- Co-authored-by: shlavik * update wallet 1.32.7 (#1376) * Fix liberland adapter balance for custom tokens (#1378) * Fix liberland adapter balance for custom tokens * liberland fixes * update min balance amount & update config --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> Co-authored-by: Nikita-Polyakov * Reduce network icons svg size (#1380) * Improve bridge locked amount check (#1381) * check bridge locked amount usinf asset kind * return bridge history search field * fix first connection logic * improve bridge history search * Set Tokens as default tab for Explore page (#1383) * Use PSWAP token instead of file-file-text-24 (#1384) * Use PSWAP token instead of file-file-text-24 * Update wallet lib --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Fix default explore page (#1386) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * bump wallet (#1389) * Fix SubsquidPoolsQuery * Fix chart volume update for XOR (#1348) * fix xor volume update * set interval polling for chart assets updates * fixes after review * update wallet 1.32.3 * deduplicate yarn.lock * Fix Eth bridge tx replacement (#1350) * refactoring eth utils methods * fix replaceable tx tracking * refactoring * Update package.json (#1353) * Update package.json * Update yarn.lock --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Demeter fixes (#1355) * fix selectedPool getter * translations from localise * add calculating text * Fix quote rpc (#1356) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Remove new stake page (#1343) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Add swap last transactions widget (#1342) * add BaseWidget component * replace StatsCard for BaseWidget * create SwapFormWidget * refactoring base widget * wip transactions table * table demo data * update transactions widget data * add links dropdown, improve paddings * update table styles * add fromTimestamp to limit query results * add withParentLoading to ScrollableTable * swap page custom layout * add distribution as widget, style fixes * swap layout fixes * change swap widgets folder structure * fix sonar issues * fix icon hover & dropdown focus * remove fixed table * set dropdown foruc rounded * update table head titles * mixin fix * fix transactions loading * update table column order --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Fix issues after PRs merge (#1360) * Fix * Remove not used styles --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * [Sub Bridge] add ability to select substrate node (#1346) * transfer to liberland * transfer from liberland * fix history fetch * refactoring adapters * update history restoration * change autoselectSubAddress * add asset outgoing minimum amount * update visible min limit * update config to sub network endpoint * multiple endpoints in adapter * update sup network apps & incoming transfer tracking * add props to SelectNodeDialog * simplify NodeErrorMixin * create connection class file * simplify trusted node check * remove nodeConnectionAllowance * remove some nodes getters * move action to class * refactoring connectToNode * transfer wallet init to App.vue * use appConnection for sora nodes * fix node info loading state * use NodesConnection in SubAdapter * sub node dialog demo * update node dialog texts * update network name in select node dialog * refactoring NodesConnection reactivity * simplify adapter * add BridgeNodeIcon * ui node name fixes * ts fixes * remove todo comments * fix failed sub tx status in history * add externalNativeMinBalance * improve connection wait logic * refactoring min deposit usage, add translation keys * check min balance in transferable amount * update bridge apps after reconnect * fix select-network disabled css * update external min balance fetch * hardcode liberland network fee * set dns regexp with exact start * add reload button to node list * refactoring after review * update translations --------- Co-authored-by: Stefan Popov Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Add skeleton to swap distribution widget (#1361) * add distribution skeleton, set tx table columns width * fix distribution sources css * fix flex-cell * return sidebar collapsed css * Update substrate lib --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Fix 1.32 issues (#1363) * Add links to bridge transfer modal (#1362) * add links to modal, update BridgeTransactionMixin * fix sub tx recipientAmount in reducer * account links in BridgeTransactionView * refactoring transaction view links * add node connection allowance timeout * return app align center * remove rococo block explorer url * fix ts issue * refactoring sonar issues * remove isOutgoingType from mixin * remove unused code * Improve bridge icons (#1364) * Add orderbook research link (#1366) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * improve external links (#1367) * Improve bridge sora links (#1370) * improve external links * add tokens.Deposited handler * fix sub blocks left & account formatting * improve sora links * improve sora links & refactoring (#1371) * update network & xcm fees (#1373) * Add ability to hide swap widgets (#1374) * add ability to hide swap widgets * add WidgetsVisibilityModel * Collapsed menu background overlaps neighbor fix * align chart header with swap widget * update customise widget * update translations * style fixes --------- Co-authored-by: shlavik * update wallet 1.32.7 (#1376) * Fix liberland adapter balance for custom tokens (#1378) * Fix liberland adapter balance for custom tokens * liberland fixes * update min balance amount & update config --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> Co-authored-by: Nikita-Polyakov * Reduce network icons svg size (#1380) * Improve bridge locked amount check (#1381) * check bridge locked amount usinf asset kind * return bridge history search field * fix first connection logic * improve bridge history search * Set Tokens as default tab for Explore page (#1383) * Use PSWAP token instead of file-file-text-24 (#1384) * Use PSWAP token instead of file-file-text-24 * Update wallet lib --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Fix default explore page (#1386) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * bump wallet (#1389) * Change SUBSQUID_ENDPOINT * Acala support (#1382) * add Alphanet to consts * save stage config * transfer subBridgeConnector to store * add moonbase alpha icon * address format research * refactoring * revert some changes * add Acala icon & sub config * fetch acala assets metadata * acala balance fetching * add acala min deposit for token * add acala extrinsic * incoming tx history restoration * refactoring outgoing process * refactoring outgoing * update reducer * refactoring * remove lib from resolutions * add moonbase xcm fee & util resolution * fixes & improvements for acala * update prod env.json to enable acala * update wallet 1.33.1 * update sub networks config in const * remove store dependency in reducer * only ACA as supported bridge token * history restoration updates * change liberland nodes order * fix adapter withConnection & selectNetwork action (#1391) * Fix bridge tx account address issues (#1393) * fix bridge tx account address issues * refactoring * update ethers & eth fee request (#1396) * improve eth fee calculation (#1397) * Account signature settings (#1394) * Burn page (#1401) * Add KARMA distribution page * Update translations * Remove subsquid * Update translations * Update package.json * Update zh_CN.json --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Add changes from master (#1403) * Update Burn.vue * Remove Liberland Governance node --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Fix min max block for Burn page (#1404) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Remove orderbook research banner (#1405) * Add disabled state for Burn page items (#1406) * Hide SORA Card from menu (#1407) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * fix history restoration & balance deposit & transaction view account addresses (#1409) * Improve calc algo & loading state for Burn page (#1410) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * formatted amount & lp fixes (#1413) * kensetsu (#1352) * Draft * Update BasePageMixin.ts * Update BasePageMixin.ts * Update yarn.lock * Add asset owner page * Improve responsive class * Fix responsive issues related to charts * Add send token tx & fix styles * Add mint tx & fix styles during tx processing * Add burn tx & fix styles during tx processing * Fix disabled state for TokenInput with slider * Support new update-name event for AddressBookInput * Draft for token creation * Update vue.config.js * Improve asset owner page * Refactor Asset owner page * Add vault store * Update state.ts * Remove useless getter from vault * Update index.ts * Add bold prop for GenericPageHeader * Add filter fn prop to SelectToken * Add kensetsu draft * Update AppMenu.vue * Use multiple quote subscriptions * Update App.vue * Refactor CreateVaultDialog * Update Vaults page * Fix max button for borrow amount * Improve styles * Add getLiquidationPenalty * Improve UI * Fix * Update AssetOwnerDetails.vue * Update kusd * Fix LtvProgressBar styles * Fix negative value for XOR as collateral * Fix styles for Vaults page * Add draft for min deposit collateral * Fix formatted values on Vaults page * AddCollateralDialog draft * Update lib version * Add PrevNextInfoLine * Add minDeposit check to Vault creation dialog * Add slot to prev-next-info-line * Fix styles for CreateVaultDialog * Add logic for AddCollateralDialog * Update AddCollateralDialog.vue * Fix decimals issues * Add BorrowMoreDialog * Update CreateVaultDialog.vue * Add RepayDebtDialog * Improve dialogs error handling & reactivity * Add close vault dialog * Add missed non-centered classes * TokenInput: remove focus & add balanceText prop * Improve numbers format for CloseVault and AddCollateral * Fix error icon size * Improve LtvProgressBar * Add new icons * Update api * Add slippage tolerance component to Kensetsu * Add subscriptions * Fix data kensetsu subscriptions * Fix PW-1562 * Update CreateVaultDialog.vue * Fix PW-1564 * Add isAddCollateralUnavailable * Update deps * Remove ken distribution page * Update translation strings * Update en.json * Add translation keys * Fix ltv calc and add en strings * Add translation strings * Fix debt calc * Refactor templates * Update CloseVaultDialog.vue * Add history based translations * Update ru.json * Improve translation strings for Kensetsu * Fix header styles * Add stats draft * Update index.ts * Add stats * Adjust ltv with max ltv * Fix format percent functions * Add title divider for Vaults page * Add MAX LTV * Update ExploreCollaterals.vue * Add kensetsu overall stats * Fix percents * Handle price tools error * Fix styles * Make borrow required during the vault creation * Improve vault creation dialog behaviour * Check total available debt for collateral in Borrow More dialog * Fix * Improve hover icon * Add borrow tax to kusdAvailable for cdp creation * Update collaterals & reduce price subs updates * Improve styles of CreateVaultDialog * Add available check for explore collaterals * Prevent events if swap button is clicked * Exclude borrow tax from available to borrow * Update BorrowMoreDialog.vue * Add collaterals subscription per block * Add paddings for collateral stats * Add ResponsiveTabs component * Update ResponsiveTabs.vue * Update substrate-js * Update electron deps * Improve responsive layouts for Kensetsu * Add feature flags * Improve available debt checks for Explore collaterals * Fix borrow link in menu * Add --sidebar-width * Fix logout state for Explore collaterals * Improve responsive design for Explore components * Fix conflicts * Stability fee -> Interest * Update messages.ts * Improve CreateVault & CloseVault translations * Improve Vaults & VaultDetails translations * Update kensetsu translations (vault -> position)) * Download files from lokalise * Update ExploreCollaterals.vue * Add kensetsu subquery queries * Add Vault Details History * Update VaultDetailsHistory.vue * Add vaults history * Update package.json * Update package.json * Fix checks * Add missed translations * Update Vaults.vue --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> Co-authored-by: NaghmeMohammadifar <45916098+Naghme98@users.noreply.github.com> Co-authored-by: Nikita-Polyakov * add missing translation (#1415) * Borrow -> Kensetsu (#1417) * Borrow -> Kensetsu * Update ru.json * Fix empty vaults state --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * cede payment integration (#1398) * Update FiatDepositOptions.vue * preload widget * add widget * remove legacy * change theme * Update CedeStoreWidget.vue * update widget * change wordings * provide colors * remove occurrences * add cede translations * debug * clear cached data * Update env.json * Add pagination to Vault history (#1416) * add pagination to Vault history * fix TransactionsWidget ts * update FetchVariables ts * fix accessor --------- Co-authored-by: Stefan Popov * fix bridge sora link (#1418) * Add KEN icon (#1420) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Fix from master 1.35 (#1424) * Fix release issues (#1421) * Update env.json (#1423) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * update wallet to 1.35.0 (#1425) * check_refer_address_sora * changed_regex_to_api_format_address * update wallet to 1.35.2 (#1429) * transform dialog to page (#1427) * transform dialog to page * Update CedeStore.vue * fix namings * change name * save localStorage field * Update index.ts * bump wallet * make btn pressed * change url * use util method * multiple fiat dialog (#1388) * copy logic * create UI * make fiat on inputs & stats * improve search * Update SelectCurrencyDialog.vue * Update ChartSkeleton.vue * make proof of concept * Revert "make proof of concept" This reverts commit a4a18075081803b9408b6cff820fa4e5705b7c45. * bump wallet * bump wallet * add missing conversion * update wallet * bump wallet * Update AppHeaderMenu.vue * fix vice versa conversion * refactor icons * Delete polkaswap_icons copy.ttf * add translations * add missing types & fixes * Update PriceChart.vue --------- Co-authored-by: Stefan Popov * Added subsquid queries * Test * Remove all filter * [Bridge] Astar support (#1399) * add astar to consts & add logo * add astar adapter methods * update wallet * add shiden to consts * add astar transfer extrinsic * improve history restoration for astar * update reducer to support astar * add todo * fix shiden link --------- Co-authored-by: Stefan Popov * Kensetsu phase 2 (#1433) * Update package.json * Update ExploreOverallStats.vue * Update marketing banner * Update OrderBook.vue * Set predev temporarily * Update deps temporarily * Update deps * Update library * Update api * Set dev * Update vault store * Upgrade kensetsu * Update action button text for Burn page * Update env.json * Update VaultDetails.vue --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> Co-authored-by: Nikita Polyakov <53777036+Nikita-Polyakov@users.noreply.github.com> * [Bridge] Support second account connect for substrate networks (#1435) * update adapters * update SelectProvider * add selectSubAccount action * use inheritance in SubAdapter * update account inject * incoming tx history update * update selectSubAccount * adding ConnectionView * connection integration * connect wallet on Bridge view * update wallet * fix change account butn * update wallet 1.38.0-beta.1 * wallet 1.38.0-beta.2 * update changeSubAccountName * add SelectSoraAccountDialog * fix sonar issues * open SORA account connect dialog on pages * fix referral route * fix build * update wallet 1.38.0 * Fix Kusama sign tx (#1437) * update adapters * update SelectProvider * add selectSubAccount action * use inheritance in SubAdapter * update account inject * incoming tx history update * update selectSubAccount * adding ConnectionView * connection integration * connect wallet on Bridge view * update wallet * fix change account butn * update wallet 1.38.0-beta.1 * wallet 1.38.0-beta.2 * update changeSubAccountName * add SelectSoraAccountDialog * fix sonar issues * open SORA account connect dialog on pages * fix referral route * fix build * create sub connection using latest polkadot api * update wallet 1.38.0 * update yarn.lock * dont call getNetworkFee on not supported networks (#1438) * Update dependencies & fix bridge account icon (#1439) * update dependencies & fix bridge account icon * deduplicate yarn.lock * app in window concept (#1422) * Update App.vue * Update App.vue * check * Update App.vue * check * Revert "check" This reverts commit 4d6bd61a960173d2ec2a6a01ac2b3b133a00f104. * Update index.html * Update App.vue * check * Update App.vue * Update App.vue * Update App.vue * Update App.vue * use npm module * include script * update wallet * Update App.vue * Update App.vue * add package * Update App.vue * Update App.vue * Update App.vue * Update App.vue * Update App.vue * Update App.vue * Update shims-tsx.d.ts * update * clean packages * Update App.vue * Update App.vue * Update App.vue * support wallet connect only * up wallet * Update NetworkStats.vue * Update Container.vue * Update Swap.vue * add missing translations * Update App.vue * Update App.vue * Update App.vue * Update App.vue * Update App.vue * remove unused keys * Fix issues * Update version * Update TokenInput.vue * Update Bridge.vue * Add new keys * Download from lokalise * Bigger Kensetsu icon --------- Co-authored-by: Stefan Popov Co-authored-by: Vladimir Shelkovnikov <99356504+C4tWithShell@users.noreply.github.com> Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> Co-authored-by: shlavik * Set configurable min limit for burn (#1432) (#1442) * convert on graphs (#1443) * convert on graphs * Update BarChart.vue * Update TvlChart.vue * Update PriceChart.vue * Update PriceChart.vue * Fix merge issue * Fix TvlChart issues related to currency selection * Fix BarChart issues related to currency selection * remove css fix * Update App.vue --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * deleted_shadow_on_the_left * Fix release 1.38 (#1444) * Fix ken distribution data * Update burnXor.ts * Fix shadows issue during Kensetsu loading * Add currency support for Kensetsu overall stats * Use usd values for isBorrowMoreUnavailable & isRepayDebtUnavailable * Add XOR as fiat currency --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * updated_with_variable_change * fixed_variables * Add bug fixes from master (#1449) * Release 0.1.2 (#80) * Add base project files * Add About page * Add unit tests * Remove unused files * Update library version * Moved images to img folder. * Refactored some styles, added normalize css. * Fixed article card header font weight. * Fix About snapshot * Fix styles and its imports * PSS-132: Token list store * Add env.json and readme * PSS-134 DevOps: Develop CI and CD processes for Polkaswap web project (#5) * add ci cd Signed-off-by: Bulat Saifullin * fix Dockerfile Signed-off-by: Bulat Saifullin * add pull_request_template.md Signed-off-by: Bulat Saifullin * fix template Signed-off-by: Bulat Saifullin * PSS-132: Select token screen * PSS-132: Refactoring * PSS-132: Change short name to symbol * PSS-132: Add i18n to select token * PSS-132: Add unit tests * PSS-132: Remove elements from tests * Added Swap Interface draft (#4) * Swap Interface: Added screen, Unit Tests, Updated UI Lib version. * PSS-132: Create pair * PSS-132: Fixes for select token * PSS-132: Fix title style * PSS-132: UPdate snaphots * PSS-132: Fix shadow * PSS-132: Fix variable style using * Swap Interface Confirmation Screens (#8) * Added Transaction Submit dialog. * Swap Interface: Moved some variables to store for better relations between different screens and dialogs. * Confirm Swap Dialog: Fixed dialog opening, added confirmation flag to the store. * Added token default logo image, refactored translation call for liquidity. * Added SelectToken dialog on click. * PSS-126: Confirm supply modal * Confirmation screens for create pair * Design fixes * Update ui lib * PSS-126: Logo component * Update tests * Wallet integration and styles issues (#10) * Wallet integration * Fix routing issues * Update UI library version * Refactor all styles * Fix wallet connected state * Update tests * Update test * Update Dockerfile (#12) * PSS-129: Add and remove liquidity page * Design fixes * Token logo check fixes * Refactoring and fixes * Add pair token logo for add liquidity * Settings implementation (#15) * Add settings dialog * Add tests * Update tests * Fix titles for info card * Pool Interface Start Screens (#11) * Pool Interface: Added Start Screen. * Refactored components due to UI Lib updates: set size and border-radius of elements. * Created Dialog wrapper component, refactored dialogs, added fixed top position, fixed close behaviour. * Refactored components imports. * Converted logo icon to link to the home page. * Fixed error in console for Create pair component. * Added Back link behaviour for several components. * Updated unit tests. * PSS-172: Dynamic Page Title (#14) * Added dynamic page title. * PSS-128: Add confirmation screens for pool (#16) * PSS-128: Add confirmation screens for pool Co-authored-by: alexnatalia * Mocks for pool screen * Refactoring * Update tests * Add liquidity button for pairs * Design Fixes and Refactoring (#17) * Refactored TokenLogo and PairTokenLogo components, fixed some bugs, updated unit tests. Refactored components headers. * Added Popper class for info tooltips. Fixed default prop value for Object types. Updated Unit tests. * Design Issues Fix (#19) * Updated configuration variables and Exchange tabs styles. * Updated About page images and styles, Header styles and Menu colors settings. Hid unused links and buttons in header. * Updeted typography variables and Font Styles: Updated Font Size, Line Height and Font Weight Configuration. * Updated Create Pair button styles. Updated Ui Lib version. * Fixed tokens icons for Pool screen. * Updated tooltips to one consistent style. Fixed Pool screen bug. * Refactored: Created special component for Generic Header. Fixed Back icon. * Updated some fonts and Pool screen styles. * Added Empty icon for Select token popup. * Added First Liquidity Provider message to Create a Pair screen. * Hid tooltip for Slider element on Settings screen, hid tooltips for Swap Confirmation. * Updated unit tests. * PSS-205: Remove liquidity: everything should be clickable and with recalculation * Update tests * Fix set remove part to 0 * Inpur for remove part * Fixes * Price container fixes * Update tests * PS-223: Fix remove liquidity in safari * PSS-205: Design Review Issues (#21) * Fixed titles case. Updated buttons with text and icons. Updated typography styles. * Update wallet version & add blockchain integration (#23) * Update wallet version & add blockchain integration * Commented out unit tests. Co-authored-by: alexnatalia * PSS-123: Select token integration * Fix async behavior for dexApi (#25) * Fix async behavior for dexApi * Update .eslintrc.js * PSS-247: Custom Slippage Tolerance Fix (#27) * Updated STab styles. * Updated UI Lib and Wallet versions and styles according to UI Lib fixes. * PSS-129: Add liquiditiy integration * PSS-74 Swap Interface Integration (#26) * Hid swap info for not connected wallet. * Updated SelectToken search by name, added check for translation existance. * Added Swap Integration. * Refactored formatNumber calls. * Hid swap info under buttons for zero amount. * Fixed Header Menu colors. * Fixed swap from Wallet assets. * Updated tooltips. * Updated About page text and Main menu links order. * Fixed Card title color for About page. * Updated Default token setting. * Updated Wallet version. * Hid Transaction Deadline area for Settings. * Removed unneeded tooltip from Settings dialog. * Added validation for Settings. * Added validation for Insufficient Amount error from server. * Added loading while not conencted, changed store to not strict mode, updated tokens setting in store. * Fixed focused behaviour for Swap input fields. * Fix wallet connection & select token behavior * Fixed Min Received format. Co-authored-by: Stefan Popov * Swap result calculation for non connected mode (#28) * Fixed Swap result calculation for non connected mode. * Fixed About page text and styles. * Fix i18n (#30) * Updated Swap input width and Max swap behaviour. Updated Swap Info styles. (#29) * PSS-271: Medium and GitHub links (#31) * Added Github and Medium links for About page. * Upated the Wallet version. * Fixed wallet button color on hover. * Calculate total suply * PSS-216: Design Issues Fixing (#32) * Updated content primary color. * Fixed Price and Token areas horizontal alignment. * Updated tooltips. * Updated Generic Header tooltip. * Updated Token item height for Select Token dialog. * Added Token icons. * Updated token icons names. * PSS-129: Create pair integration * Remove mocks * Refactoring * Add network fee calculation * Fixes * PSS-281: Recalculate Input Values On Select Token (#33) * Added util method to check isNumber value. Removed Max button from token To area. * Added Max sold for reversed swap. * Updated Swap Integration. * Updated UI Lib version. * Added recalc on Select Token. * Fixed Swap for Polkadot.js * Updated isExchangeB param in methods. * Hid Node Address area for Settings popup. * Added Network Fee field to Swap component. * Updated Custom slippage tolerance for Settings. * Fixed paste string value to Swap fields. * Updated Network Fee calls, updated Wallet version, fixed swap tokens balance. * Added isExchangeB parameter to swap call. * Refactoring * fix total supply * PSS-129: Share of pool * Remove share of pool mock * Fix get asset symbol * Hide add liquidity Fix slippage tolerance for add liquidity Fix share of pool Fix unsupprted assets error message * Disable max button for add liquidity Reset values after change tokens * Fixes * Updated Tokens Icons, added PAL icon. (#35) * Wallet connection issues (#38) * Fix wallet connection issues * Fix styles * Update wallet version * Update favicon.ico * PSS-297: check fee on max amount * PSS-295: Added Insufficient Balance Checking (#37) * Added Insufficient balance checking. * Updated FPNumber parameters. * Removed formatNumber usage from Swap screens. * Fixed focus and placeholders values for Swap. * Updated some styles for huge number values. * Refactored due to PR comments. * Result Dialog Styles Fix (#41) * Fixed Result Dialog button styles. * Renamed USD icon. * Update library * Fix swap, liquidity behavior * Update index.ts * TODO: Revert this commit after PSS-309 * Updated wallet version. Co-authored-by: Stefan Popov * PSS-273: WEB UI: Connect Wallet - Close button leads always on Exchange page, not to the previous page (#42) * Fix routing issue * Update wallet version * PSS-295: Confirm Swap Insufficient Balance Checking (#43) * Fixed console error on tokens switch. * Added Is Insufficient Balance checking for Confirm Swap dialog. * Updated Confirm Swap styles. * Updated Swap info after Swap, added max button to init screen. (#44) * Update ui library version (#46) * Update ui library version * Update wallet * BP-312: Fixes for pool * Fix icons position (#47) * Fix icons position * Fix logo * PSS-287: Swap Amount Fields Formatting (#45) * Added Swap fields formatter. * Fixed Slippage Tolerance editing and Swap fields formatting. * Updated wallet version. * Change toString to toFixed * Change formatNumber to toFixed * Fix remove liquidity price * Move back toFixed to toString * Fixed estimated label existence for zero values (#50) * Refactored, added some comments, fixed estimated label existence for zero values. * Modify env config file (#49) Co-authored-by: Bulat Saifullin * Add custom notifications & notification tracking service (#51) * Add custom notifications & notification tracking service * Update notifications & strings according to latest changes * Update api * Update soramitsu-variables.scss * PSS-335: Designer Feedback Fixes FE (#53) * Fixed functionality and layout bugs. * Added draft component to fix layout behaviour. * Fixed Settings behaviour. * Swap: removed Result dialog, edited Network Fee tooltip. * Fixed translation bugs. * Account info implementation & fix loading state (#54) * Add account info * Fix styles * Hide test assets (#55) * Update connection * Remove usdt mock * Add liquidity issues & update notifications (#56) * Add missing notifications * Update RemoveLiquidity * Fix add liquidity screen * Add async loading of liquidity * Fix pool issues * Updated not connected pool interface message. (#60) * PSS-300: Swap confirmation dialog message update (#61) * Updated Swap confirmation dialog message. * Confirm Swap Dialog: Updated message for max sold behaviour. * Swap screen: Fixed Min Received/Max Sold area asset symbol. (#62) * PSS-379: WEB UI. Add liquidity. Click MAX button on 0 balance of XOR (#59) * Updated wallet version. Swap, Add Liquidity, Create Pair components: Updated Max button availability, refactored. * Refactored due to PR comments. * Swap, Add Liquidity: Fixed negative amount after max. Updated wallet version. * Create pair implementation & fix liquidity issues (#63) * Add create pair implementation & fix logic for add liquidity * PSS-297: WEB UI: Restrict Adding liquidity if balance is insufficient (#64) * Add Liquidity: Refactored Insufficient Balance. * Create Pair, Remove Liquidity: Updated Max functionality. * Add insufficient liquidity message for swap (#66) * link @soramitsu/soraneo-wallet-web 0.4.6 * return network address * use wallet routes in app.vue to correctly handle wallet icon click * set changePage method as private * removed local model for inputs: createPairModel * refactoring CreatePair methods * add input maxlength check * fix inputMaxLength method * improve formatNumberField method * refactoring inputMaxLength method * refactoring AddLiquidity view * create TokenPair mixin * wip refactoring * add maxlength to removeLiquidity view inputs * create TokenInputMixin * add input handlers on removeLiquidity view * handle swap inputs * return commented line * PSS-400: WEB UI. Minimum receive/Maximum sold token not changed (#69) * Fixed min received/max sold symbol. * Update wallet & api version (#70) * fixes after review * add store state interfaces * PSS-467: On the swap screen user should be able to select all tokens excecpt pool tokens (#71) * Update wallet & api version * Fix swap with assets created by user * Update wallet & api version * add watcher for slippageTolerance in Swap.vue * remove console lgos * use state types in store mutations & getters * apply transaction mixin changes from wallet * update @soramitsu/soraneo-wallet-web dependency * navigate to wallet connection view on wallet click (#75) * PSS-419: restrict precision in inputs (#74) * add TokenInput component * use TokenInput in Swap.vue * add ConfirmDialogMixin * prepare to refactoring modals * remove comments * remove unneccessary actions * add TODO comments * fix TokenInput handler * link js-ui-library with input fix * PSS-398: WEB UI. Multiple click on Confirm - create multiple transactions. (#76) * Fix multiple confirm for operations * Fix notifications view * Update env.json * PSS-364: reuse s-float-input component (#77) * prepare TokenInput component for export * use s-float-input instead of TokenInput * refactoring Settings component * refactoring RemoveLiquidity * Update wallet (#79) Co-authored-by: alexnatalia Co-authored-by: Aleksandr Makhnev Co-authored-by: Bulat Saifullin Co-authored-by: Alex Natalia <38787212+alexnatalia@users.noreply.github.com> Co-authored-by: Dmitriy Creed Co-authored-by: alexnatalia Co-authored-by: Nikita Polyakov Co-authored-by: Nikita-Polyakov Co-authored-by: Nikita Polyakov <53777036+Nikita-Polyakov@users.noreply.github.com> * Release 0.1.3 (#97) * Add base project files * Add About page * Add unit tests * Remove unused files * Update library version * Moved images to img folder. * Refactored some styles, added normalize css. * Fixed article card header font weight. * Fix About snapshot * Fix styles and its imports * PSS-132: Token list store * Add env.json and readme * PSS-134 DevOps: Develop CI and CD processes for Polkaswap web project (#5) * add ci cd Signed-off-by: Bulat Saifullin * fix Dockerfile Signed-off-by: Bulat Saifullin * add pull_request_template.md Signed-off-by: Bulat Saifullin * fix template Signed-off-by: Bulat Saifullin * PSS-132: Select token screen * PSS-132: Refactoring * PSS-132: Change short name to symbol * PSS-132: Add i18n to select token * PSS-132: Add unit tests * PSS-132: Remove elements from tests * Added Swap Interface draft (#4) * Swap Interface: Added screen, Unit Tests, Updated UI Lib version. * PSS-132: Create pair * PSS-132: Fixes for select token * PSS-132: Fix title style * PSS-132: UPdate snaphots * PSS-132: Fix shadow * PSS-132: Fix variable style using * Swap Interface Confirmation Screens (#8) * Added Transaction Submit dialog. * Swap Interface: Moved some variables to store for better relations between different screens and dialogs. * Confirm Swap Dialog: Fixed dialog opening, added confirmation flag to the store. * Added token default logo image, refactored translation call for liquidity. * Added SelectToken dialog on click. * PSS-126: Confirm supply modal * Confirmation screens for create pair * Design fixes * Update ui lib * PSS-126: Logo component * Update tests * Wallet integration and styles issues (#10) * Wallet integration * Fix routing issues * Update UI library version * Refactor all styles * Fix wallet connected state * Update tests * Update test * Update Dockerfile (#12) * PSS-129: Add and remove liquidity page * Design fixes * Token logo check fixes * Refactoring and fixes * Add pair token logo for add liquidity * Settings implementation (#15) * Add settings dialog * Add tests * Update tests * Fix titles for info card * Pool Interface Start Screens (#11) * Pool Interface: Added Start Screen. * Refactored components due to UI Lib updates: set size and border-radius of elements. * Created Dialog wrapper component, refactored dialogs, added fixed top position, fixed close behaviour. * Refactored components imports. * Converted logo icon to link to the home page. * Fixed error in console for Create pair component. * Added Back link behaviour for several components. * Updated unit tests. * PSS-172: Dynamic Page Title (#14) * Added dynamic page title. * PSS-128: Add confirmation screens for pool (#16) * PSS-128: Add confirmation screens for pool Co-authored-by: alexnatalia * Mocks for pool screen * Refactoring * Update tests * Add liquidity button for pairs * Design Fixes and Refactoring (#17) * Refactored TokenLogo and PairTokenLogo components, fixed some bugs, updated unit tests. Refactored components headers. * Added Popper class for info tooltips. Fixed default prop value for Object types. Updated Unit tests. * Design Issues Fix (#19) * Updated configuration variables and Exchange tabs styles. * Updated About page images and styles, Header styles and Menu colors settings. Hid unused links and buttons in header. * Updeted typography variables and Font Styles: Updated Font Size, Line Height and Font Weight Configuration. * Updated Create Pair button styles. Updated Ui Lib version. * Fixed tokens icons for Pool screen. * Updated tooltips to one consistent style. Fixed Pool screen bug. * Refactored: Created special component for Generic Header. Fixed Back icon. * Updated some fonts and Pool screen styles. * Added Empty icon for Select token popup. * Added First Liquidity Provider message to Create a Pair screen. * Hid tooltip for Slider element on Settings screen, hid tooltips for Swap Confirmation. * Updated unit tests. * PSS-205: Remove liquidity: everything should be clickable and with recalculation * Update tests * Fix set remove part to 0 * Inpur for remove part * Fixes * Price container fixes * Update tests * PS-223: Fix remove liquidity in safari * PSS-205: Design Review Issues (#21) * Fixed titles case. Updated buttons with text and icons. Updated typography styles. * Update wallet version & add blockchain integration (#23) * Update wallet version & add blockchain integration * Commented out unit tests. Co-authored-by: alexnatalia * PSS-123: Select token integration * Fix async behavior for dexApi (#25) * Fix async behavior for dexApi * Update .eslintrc.js * PSS-247: Custom Slippage Tolerance Fix (#27) * Updated STab styles. * Updated UI Lib and Wallet versions and styles according to UI Lib fixes. * PSS-129: Add liquiditiy integration * PSS-74 Swap Interface Integration (#26) * Hid swap info for not connected wallet. * Updated SelectToken search by name, added check for translation existance. * Added Swap Integration. * Refactored formatNumber calls. * Hid swap info under buttons for zero amount. * Fixed Header Menu colors. * Fixed swap from Wallet assets. * Updated tooltips. * Updated About page text and Main menu links order. * Fixed Card title color for About page. * Updated Default token setting. * Updated Wallet version. * Hid Transaction Deadline area for Settings. * Removed unneeded tooltip from Settings dialog. * Added validation for Settings. * Added validation for Insufficient Amount error from server. * Added loading while not conencted, changed store to not strict mode, updated tokens setting in store. * Fixed focused behaviour for Swap input fields. * Fix wallet connection & select token behavior * Fixed Min Received format. Co-authored-by: Stefan Popov * Swap result calculation for non connected mode (#28) * Fixed Swap result calculation for non connected mode. * Fixed About page text and styles. * Fix i18n (#30) * Updated Swap input width and Max swap behaviour. Updated Swap Info styles. (#29) * PSS-271: Medium and GitHub links (#31) * Added Github and Medium links for About page. * Upated the Wallet version. * Fixed wallet button color on hover. * Calculate total suply * PSS-216: Design Issues Fixing (#32) * Updated content primary color. * Fixed Price and Token areas horizontal alignment. * Updated tooltips. * Updated Generic Header tooltip. * Updated Token item height for Select Token dialog. * Added Token icons. * Updated token icons names. * PSS-129: Create pair integration * Remove mocks * Refactoring * Add network fee calculation * Fixes * PSS-281: Recalculate Input Values On Select Token (#33) * Added util method to check isNumber value. Removed Max button from token To area. * Added Max sold for reversed swap. * Updated Swap Integration. * Updated UI Lib version. * Added recalc on Select Token. * Fixed Swap for Polkadot.js * Updated isExchangeB param in methods. * Hid Node Address area for Settings popup. * Added Network Fee field to Swap component. * Updated Custom slippage tolerance for Settings. * Fixed paste string value to Swap fields. * Updated Network Fee calls, updated Wallet version, fixed swap tokens balance. * Added isExchangeB parameter to swap call. * Refactoring * fix total supply * PSS-129: Share of pool * Remove share of pool mock * Fix get asset symbol * Hide add liquidity Fix slippage tolerance for add liquidity Fix share of pool Fix unsupprted assets error message * Disable max button for add liquidity Reset values after change tokens * Fixes * Updated Tokens Icons, added PAL icon. (#35) * Wallet connection issues (#38) * Fix wallet connection issues * Fix styles * Update wallet version * Update favicon.ico * PSS-297: check fee on max amount * PSS-295: Added Insufficient Balance Checking (#37) * Added Insufficient balance checking. * Updated FPNumber parameters. * Removed formatNumber usage from Swap screens. * Fixed focus and placeholders values for Swap. * Updated some styles for huge number values. * Refactored due to PR comments. * Result Dialog Styles Fix (#41) * Fixed Result Dialog button styles. * Renamed USD icon. * Update library * Fix swap, liquidity behavior * Update index.ts * TODO: Revert this commit after PSS-309 * Updated wallet version. Co-authored-by: Stefan Popov * PSS-273: WEB UI: Connect Wallet - Close button leads always on Exchange page, not to the previous page (#42) * Fix routing issue * Update wallet version * PSS-295: Confirm Swap Insufficient Balance Checking (#43) * Fixed console error on tokens switch. * Added Is Insufficient Balance checking for Confirm Swap dialog. * Updated Confirm Swap styles. * Updated Swap info after Swap, added max button to init screen. (#44) * Update ui library version (#46) * Update ui library version * Update wallet * BP-312: Fixes for pool * Fix icons position (#47) * Fix icons position * Fix logo * PSS-287: Swap Amount Fields Formatting (#45) * Added Swap fields formatter. * Fixed Slippage Tolerance editing and Swap fields formatting. * Updated wallet version. * Change toString to toFixed * Change formatNumber to toFixed * Fix remove liquidity price * Move back toFixed to toString * Fixed estimated label existence for zero values (#50) * Refactored, added some comments, fixed estimated label existence for zero values. * Modify env config file (#49) Co-authored-by: Bulat Saifullin * Add custom notifications & notification tracking service (#51) * Add custom notifications & notification tracking service * Update notifications & strings according to latest changes * Update api * Update soramitsu-variables.scss * PSS-335: Designer Feedback Fixes FE (#53) * Fixed functionality and layout bugs. * Added draft component to fix layout behaviour. * Fixed Settings behaviour. * Swap: removed Result dialog, edited Network Fee tooltip. * Fixed translation bugs. * Account info implementation & fix loading state (#54) * Add account info * Fix styles * Hide test assets (#55) * Update connection * Remove usdt mock * Add liquidity issues & update notifications (#56) * Add missing notifications * Update RemoveLiquidity * Fix add liquidity screen * Add async loading of liquidity * Fix pool issues * Updated not connected pool interface message. (#60) * PSS-300: Swap confirmation dialog message update (#61) * Updated Swap confirmation dialog message. * Confirm Swap Dialog: Updated message for max sold behaviour. * Swap screen: Fixed Min Received/Max Sold area asset symbol. (#62) * PSS-379: WEB UI. Add liquidity. Click MAX button on 0 balance of XOR (#59) * Updated wallet version. Swap, Add Liquidity, Create Pair components: Updated Max button availability, refactored. * Refactored due to PR comments. * Swap, Add Liquidity: Fixed negative amount after max. Updated wallet version. * Create pair implementation & fix liquidity issues (#63) * Add create pair implementation & fix logic for add liquidity * PSS-297: WEB UI: Restrict Adding liquidity if balance is insufficient (#64) * Add Liquidity: Refactored Insufficient Balance. * Create Pair, Remove Liquidity: Updated Max functionality. * Add insufficient liquidity message for swap (#66) * link @soramitsu/soraneo-wallet-web 0.4.6 * return network address * use wallet routes in app.vue to correctly handle wallet icon click * set changePage method as private * removed local model for inputs: createPairModel * refactoring CreatePair methods * add input maxlength check * fix inputMaxLength method * improve formatNumberField method * refactoring inputMaxLength method * refactoring AddLiquidity view * create TokenPair mixin * wip refactoring * add maxlength to removeLiquidity view inputs * create TokenInputMixin * add input handlers on removeLiquidity view * handle swap inputs * return commented line * PSS-400: WEB UI. Minimum receive/Maximum sold token not changed (#69) * Fixed min received/max sold symbol. * Update wallet & api version (#70) * fixes after review * add store state interfaces * PSS-467: On the swap screen user should be able to select all tokens excecpt pool tokens (#71) * Update wallet & api version * Fix swap with assets created by user * Update wallet & api version * add watcher for slippageTolerance in Swap.vue * remove console lgos * use state types in store mutations & getters * apply transaction mixin changes from wallet * update @soramitsu/soraneo-wallet-web dependency * navigate to wallet connection view on wallet click (#75) * PSS-419: restrict precision in inputs (#74) * add TokenInput component * use TokenInput in Swap.vue * add ConfirmDialogMixin * prepare to refactoring modals * remove comments * remove unneccessary actions * add TODO comments * fix TokenInput handler * link js-ui-library with input fix * PSS-398: WEB UI. Multiple click on Confirm - create multiple transactions. (#76) * Fix multiple confirm for operations * Fix notifications view * Update env.json * PSS-364: reuse s-float-input component (#77) * prepare TokenInput component for export * use s-float-input instead of TokenInput * refactoring Settings component * refactoring RemoveLiquidity * Update wallet (#79) * SFloatInput Fixes (#82) * Reseted values and tokens for Add Liquidity and Create Pair components, added placeholders for all SFloatInput elements. * PSS-378: WEB UI. Remove liquidity. Troubles with entering of amount manually (#83) * Reseted values and tokens for Add Liquidity and Create Pair components, added placeholders for all SFloatInput elements. * Remove liquidity: fixed fields editing and insufficient balance calculation. * Remove Liquidity: Fixed editing behaviour. * Updated due to PR comments. * PSS-486: reset vuex values after transaction (#81) * PSS-351: Show balance in select token dialog (#84) * wip assetList * fixes in swap * fix types * remove unused imports * Refactoring Modals: add ConfirmTokenPairDialog component (#78) * add ConfirmTokenPairDialog component * add modal props fix and throw error on create pair failure * fix openSelectTokenDialog method in Swap.vue(#86) * PSS-350: Add clear button to select token search input (#85) * add clear button * refactoring mixin * remove global style in SelectToken * use global style for input button * Update wallet (#87) * Update wallet * Change s-form-item to div in SelectToken dialog (#88) * remove s-form-item * change wrapper classname * Refactoring swap view (#89) * wip * remove formModel * add reset fields method * wip swap values * refactoring minMaxRecieved calls * wip refactoring * use exchangeB as source of truth * use isExchangeB instead of activeField * disable switch during values calculation * recounting check * use promise all for parallel calculation * update ui library * discarding env.json * fixes after revie * Hide balance in SelectToken dialog, if wallet not connected (#91) * Add license (#92) * PSS-248 Web UI: Settings - Problems with input in Custom field (#90) * allow type any value * fix error * add local model * PSS-418: Precision management (#93) * Create NumberFormatterMixin.ts * Improve precision management for pool * Improve precision management for swap operation * Improve precision management for select token dialog * Update AddLiquidity.vue * Improve precision management for remove liquidity operation * Update todo sections * Fix issues * Update wallet & api versions * Add balance updates * Add zero string const * update wallet (#94) * PSS-351 Select Token fixes (#95) * select-token fixes * show 0 balance as - Co-authored-by: alexnatalia Co-authored-by: Aleksandr Makhnev Co-authored-by: Bulat Saifullin Co-authored-by: Alex Natalia <38787212+alexnatalia@users.noreply.github.com> Co-authored-by: Dmitriy Creed Co-authored-by: alexnatalia Co-authored-by: Nikita Polyakov Co-authored-by: Nikita-Polyakov Co-authored-by: Nikita Polyakov <53777036+Nikita-Polyakov@users.noreply.github.com> * Release 0.1.3 (#100) * PSS-516: WEB UI. Can go to remove liquidity page without liquidity on account (#96) * Added Page Not Found Draft. * Fixed Add and Remove Liquidity router bags, hid some screens for unauthorized access. Added redirect to exchange for Page Not Found error. * Disabled selects for existed liquidity addition. * Update Swap.vue (#99) * Release 0.1.4 (#126) * Add base project files * Add About page * Add unit tests * Remove unused files * Update library version * Moved images to img folder. * Refactored some styles, added normalize css. * Fixed article card header font weight. * Fix About snapshot * Fix styles and its imports * PSS-132: Token list store * Add env.json and readme * PSS-134 DevOps: Develop CI and CD processes for Polkaswap web project (#5) * add ci cd Signed-off-by: Bulat Saifullin * fix Dockerfile Signed-off-by: Bulat Saifullin * add pull_request_template.md Signed-off-by: Bulat Saifullin * fix template Signed-off-by: Bulat Saifullin * PSS-132: Select token screen * PSS-132: Refactoring * PSS-132: Change short name to symbol * PSS-132: Add i18n to select token * PSS-132: Add unit tests * PSS-132: Remove elements from tests * Added Swap Interface draft (#4) * Swap Interface: Added screen, Unit Tests, Updated UI Lib version. * PSS-132: Create pair * PSS-132: Fixes for select token * PSS-132: Fix title style * PSS-132: UPdate snaphots * PSS-132: Fix shadow * PSS-132: Fix variable style using * Swap Interface Confirmation Screens (#8) * Added Transaction Submit dialog. * Swap Interface: Moved some variables to store for better relations between different screens and dialogs. * Confirm Swap Dialog: Fixed dialog opening, added confirmation flag to the store. * Added token default logo image, refactored translation call for liquidity. * Added SelectToken dialog on click. * PSS-126: Confirm supply modal * Confirmation screens for create pair * Design fixes * Update ui lib * PSS-126: Logo component * Update tests * Wallet integration and styles issues (#10) * Wallet integration * Fix routing issues * Update UI library version * Refactor all styles * Fix wallet connected state * Update tests * Update test * Update Dockerfile (#12) * PSS-129: Add and remove liquidity page * Design fixes * Token logo check fixes * Refactoring and fixes * Add pair token logo for add liquidity * Settings implementation (#15) * Add settings dialog * Add tests * Update tests * Fix titles for info card * Pool Interface Start Screens (#11) * Pool Interface: Added Start Screen. * Refactored components due to UI Lib updates: set size and border-radius of elements. * Created Dialog wrapper component, refactored dialogs, added fixed top position, fixed close behaviour. * Refactored components imports. * Converted logo icon to link to the home page. * Fixed error in console for Create pair component. * Added Back link behaviour for several components. * Updated unit tests. * PSS-172: Dynamic Page Title (#14) * Added dynamic page title. * PSS-128: Add confirmation screens for pool (#16) * PSS-128: Add confirmation screens for pool Co-authored-by: alexnatalia * Mocks for pool screen * Refactoring * Update tests * Add liquidity button for pairs * Design Fixes and Refactoring (#17) * Refactored TokenLogo and PairTokenLogo components, fixed some bugs, updated unit tests. Refactored components headers. * Added Popper class for info tooltips. Fixed default prop value for Object types. Updated Unit tests. * Design Issues Fix (#19) * Updated configuration variables and Exchange tabs styles. * Updated About page images and styles, Header styles and Menu colors settings. Hid unused links and buttons in header. * Updeted typography variables and Font Styles: Updated Font Size, Line Height and Font Weight Configuration. * Updated Create Pair button styles. Updated Ui Lib version. * Fixed tokens icons for Pool screen. * Updated tooltips to one consistent style. Fixed Pool screen bug. * Refactored: Created special component for Generic Header. Fixed Back icon. * Updated some fonts and Pool screen styles. * Added Empty icon for Select token popup. * Added First Liquidity Provider message to Create a Pair screen. * Hid tooltip for Slider element on Settings screen, hid tooltips for Swap Confirmation. * Updated unit tests. * PSS-205: Remove liquidity: everything should be clickable and with recalculation * Update tests * Fix set remove part to 0 * Inpur for remove part * Fixes * Price container fixes * Update tests * PS-223: Fix remove liquidity in safari * PSS-205: Design Review Issues (#21) * Fixed titles case. Updated buttons with text and icons. Updated typography styles. * Update wallet version & add blockchain integration (#23) * Update wallet version & add blockchain integration * Commented out unit tests. Co-authored-by: alexnatalia * PSS-123: Select token integration * Fix async behavior for dexApi (#25) * Fix async behavior for dexApi * Update .eslintrc.js * PSS-247: Custom Slippage Tolerance Fix (#27) * Updated STab styles. * Updated UI Lib and Wallet versions and styles according to UI Lib fixes. * PSS-129: Add liquiditiy integration * PSS-74 Swap Interface Integration (#26) * Hid swap info for not connected wallet. * Updated SelectToken search by name, added check for translation existance. * Added Swap Integration. * Refactored formatNumber calls. * Hid swap info under buttons for zero amount. * Fixed Header Menu colors. * Fixed swap from Wallet assets. * Updated tooltips. * Updated About page text and Main menu links order. * Fixed Card title color for About page. * Updated Default token setting. * Updated Wallet version. * Hid Transaction Deadline area for Settings. * Removed unneeded tooltip from Settings dialog. * Added validation for Settings. * Added validation for Insufficient Amount error from server. * Added loading while not conencted, changed store to not strict mode, updated tokens setting in store. * Fixed focused behaviour for Swap input fields. * Fix wallet connection & select token behavior * Fixed Min Received format. Co-authored-by: Stefan Popov * Swap result calculation for non connected mode (#28) * Fixed Swap result calculation for non connected mode. * Fixed About page text and styles. * Fix i18n (#30) * Updated Swap input width and Max swap behaviour. Updated Swap Info styles. (#29) * PSS-271: Medium and GitHub links (#31) * Added Github and Medium links for About page. * Upated the Wallet version. * Fixed wallet button color on hover. * Calculate total suply * PSS-216: Design Issues Fixing (#32) * Updated content primary color. * Fixed Price and Token areas horizontal alignment. * Updated tooltips. * Updated Generic Header tooltip. * Updated Token item height for Select Token dialog. * Added Token icons. * Updated token icons names. * PSS-129: Create pair integration * Remove mocks * Refactoring * Add network fee calculation * Fixes * PSS-281: Recalculate Input Values On Select Token (#33) * Added util method to check isNumber value. Removed Max button from token To area. * Added Max sold for reversed swap. * Updated Swap Integration. * Updated UI Lib version. * Added recalc on Select Token. * Fixed Swap for Polkadot.js * Updated isExchangeB param in methods. * Hid Node Address area for Settings popup. * Added Network Fee field to Swap component. * Updated Custom slippage tolerance for Settings. * Fixed paste string value to Swap fields. * Updated Network Fee calls, updated Wallet version, fixed swap tokens balance. * Added isExchangeB parameter to swap call. * Refactoring * fix total supply * PSS-129: Share of pool * Remove share of pool mock * Fix get asset symbol * Hide add liquidity Fix slippage tolerance for add liquidity Fix share of pool Fix unsupprted assets error message * Disable max button for add liquidity Reset values after change tokens * Fixes * Updated Tokens Icons, added PAL icon. (#35) * Wallet connection issues (#38) * Fix wallet connection issues * Fix styles * Update wallet version * Update favicon.ico * PSS-297: check fee on max amount * PSS-295: Added Insufficient Balance Checking (#37) * Added Insufficient balance checking. * Updated FPNumber parameters. * Removed formatNumber usage from Swap screens. * Fixed focus and placeholders values for Swap. * Updated some styles for huge number values. * Refactored due to PR comments. * Result Dialog Styles Fix (#41) * Fixed Result Dialog button styles. * Renamed USD icon. * Update library * Fix swap, liquidity behavior * Update index.ts * TODO: Revert this commit after PSS-309 * Updated wallet version. Co-authored-by: Stefan Popov * PSS-273: WEB UI: Connect Wallet - Close button leads always on Exchange page, not to the previous page (#42) * Fix routing issue * Update wallet version * PSS-295: Confirm Swap Insufficient Balance Checking (#43) * Fixed console error on tokens switch. * Added Is Insufficient Balance checking for Confirm Swap dialog. * Updated Confirm Swap styles. * Updated Swap info after Swap, added max button to init screen. (#44) * Update ui library version (#46) * Update ui library version * Update wallet * BP-312: Fixes for pool * Fix icons position (#47) * Fix icons position * Fix logo * PSS-287: Swap Amount Fields Formatting (#45) * Added Swap fields formatter. * Fixed Slippage Tolerance editing and Swap fields formatting. * Updated wallet version. * Change toString to toFixed * Change formatNumber to toFixed * Fix remove liquidity price * Move back toFixed to toString * Fixed estimated label existence for zero values (#50) * Refactored, added some comments, fixed estimated label existence for zero values. * Modify env config file (#49) Co-authored-by: Bulat Saifullin * Add custom notifications & notification tracking service (#51) * Add custom notifications & notification tracking service * Update notifications & strings according to latest changes * Update api * Update soramitsu-variables.scss * PSS-335: Designer Feedback Fixes FE (#53) * Fixed functionality and layout bugs. * Added draft component to fix layout behaviour. * Fixed Settings behaviour. * Swap: removed Result dialog, edited Network Fee tooltip. * Fixed translation bugs. * Account info implementation & fix loading state (#54) * Add account info * Fix styles * Hide test assets (#55) * Update connection * Remove usdt mock * Add liquidity issues & update notifications (#56) * Add missing notifications * Update RemoveLiquidity * Fix add liquidity screen * Add async loading of liquidity * Fix pool issues * Updated not connected pool interface message. (#60) * PSS-300: Swap confirmation dialog message update (#61) * Updated Swap confirmation dialog message. * Confirm Swap Dialog: Updated message for max sold behaviour. * Swap screen: Fixed Min Received/Max Sold area asset symbol. (#62) * PSS-379: WEB UI. Add liquidity. Click MAX button on 0 balance of XOR (#59) * Updated wallet version. Swap, Add Liquidity, Create Pair components: Updated Max button availability, refactored. * Refactored due to PR comments. * Swap, Add Liquidity: Fixed negative amount after max. Updated wallet version. * Create pair implementation & fix liquidity issues (#63) * Add create pair implementation & fix logic for add liquidity * PSS-297: WEB UI: Restrict Adding liquidity if balance is insufficient (#64) * Add Liquidity: Refactored Insufficient Balance. * Create Pair, Remove Liquidity: Updated Max functionality. * Add insufficient liquidity message for swap (#66) * link @soramitsu/soraneo-wallet-web 0.4.6 * return network address * use wallet routes in app.vue to correctly handle wallet icon click * set changePage method as private * removed local model for inputs: createPairModel * refactoring CreatePair methods * add input maxlength check * fix inputMaxLength method * improve formatNumberField method * refactoring inputMaxLength method * refactoring AddLiquidity view * create TokenPair mixin * wip refactoring * add maxlength to removeLiquidity view inputs * create TokenInputMixin * add input handlers on removeLiquidity view * handle swap inputs * return commented line * PSS-400: WEB UI. Minimum receive/Maximum sold token not changed (#69) * Fixed min received/max sold symbol. * Update wallet & api version (#70) * fixes after review * add store state interfaces * PSS-467: On the swap screen user should be able to select all tokens excecpt pool tokens (#71) * Update wallet & api version * Fix swap with assets created by user * Update wallet & api version * add watcher for slippageTolerance in Swap.vue * remove console lgos * use state types in store mutations & getters * apply transaction mixin changes from wallet * update @soramitsu/soraneo-wallet-web dependency * navigate to wallet connection view on wallet click (#75) * PSS-419: restrict precision in inputs (#74) * add TokenInput component * use TokenInput in Swap.vue * add ConfirmDialogMixin * prepare to refactoring modals * remove comments * remove unneccessary actions * add TODO comments * fix TokenInput handler * link js-ui-library with input fix * PSS-398: WEB UI. Multiple click on Confirm - create multiple transactions. (#76) * Fix multiple confirm for operations * Fix notifications view * Update env.json * PSS-364: reuse s-float-input component (#77) * prepare TokenInput component for export * use s-float-input instead of TokenInput * refactoring Settings component * refactoring RemoveLiquidity * Update wallet (#79) * SFloatInput Fixes (#82) * Reseted values and tokens for Add Liquidity and Create Pair components, added placeholders for all SFloatInput elements. * PSS-378: WEB UI. Remove liquidity. Troubles with entering of amount manually (#83) * Reseted values and tokens for Add Liquidity and Create Pair components, added placeholders for all SFloatInput elements. * Remove liquidity: fixed fields editing and insufficient balance calculation. * Remove Liquidity: Fixed editing behaviour. * Updated due to PR comments. * PSS-486: reset vuex values after transaction (#81) * PSS-351: Show balance in select token dialog (#84) * wip assetList * fixes in swap * fix types * remove unused imports * Refactoring Modals: add ConfirmTokenPairDialog component (#78) * add ConfirmTokenPairDialog component * add modal props fix and throw error on create pair failure * fix openSelectTokenDialog method in Swap.vue(#86) * PSS-350: Add clear button to select token search input (#85) * add clear button * refactoring mixin * remove global style in SelectToken * use global style for input button * Update wallet (#87) * Update wallet * Change s-form-item to div in SelectToken dialog (#88) * remove s-form-item * change wrapper classname * Refactoring swap view (#89) * wip * remove formModel * add reset fields method * wip swap values * refactoring minMaxRecieved calls * wip refactoring * use exchangeB as source of truth * use isExchangeB instead of activeField * disable switch during values calculation * recounting check * use promise all for parallel calculation * update ui library * discarding env.json * fixes after revie * Hide balance in SelectToken dialog, if wallet not connected (#91) * Add license (#92) * PSS-248 Web UI: Settings - Problems with input in Custom field (#90) * allow type any value * fix error * add local model * PSS-418: Precision management (#93) * Create NumberFormatterMixin.ts * Improve precision management for pool * Improve precision management for swap operation * Improve precision management for select token dialog * Update AddLiquidity.vue * Improve precision management for remove liquidity operation * Update todo sections * Fix issues * Update wallet & api versions * Add balance updates * Add zero string const * update wallet (#94) * PSS-351 Select Token fixes (#95) * select-token fixes * show 0 balance as - * PSS-516: WEB UI. Can go to remove liquidity page without liquidity on account (#96) * Added Page Not Found Draft. * Fixed Add and Remove Liquidity router bags, hid some screens for unauthorized access. Added redirect to exchange for Page Not Found error. * Disabled selects for existed liquidity addition. * Update Swap.vue (#99) * Add namespace & types for swap (#101) * Fix price and swap info (#104) * Fix price calculations * Update SwapInfo.vue * Update wallet & api (#105) * Fix swap links (#106) * Fix swap links * Update wallet * Update api (#111) * up wallet version (#112) * Updated wallet version to 0.6.3 (#113) * Updated wallet version to 0.6.4. (#114) * Polkaswap layout redesign (#98) (#102) * Polkaswap layout redesign (#98) * pss-498 header redesign * wip pss-496 * style fixes * add HelpDialog component * reexport package.json * exchange routing fix * add Rewards stub with coming soon text * refactoring SidebarItemContent * refactoring styles * add FAUCET_URL to env.json * fixes after review * fix sidebar item hover css * fix disabled item css * Move bridge functionality (#103) * pss-498 header redesign * wip pss-496 * style fixes * add HelpDialog component * reexport package.json * exchange routing fix * add Rewards stub with coming soon text * refactoring SidebarItemContent * refactoring styles * add FAUCET_URL to env.json * fixes after review * Move bridge functionality Co-authored-by: Nikita-Polyakov * Update wallet & api * PSS-524: Bridge (#107) * pss-498 header redesign * wip pss-496 * style fixes * add HelpDialog component * reexport package.json * exchange routing fix * add Rewards stub with coming soon text * refactoring SidebarItemContent * refactoring styles * add FAUCET_URL to env.json * fixes after review * Move bridge functionality * Bridge: Updated unauthorized routes. * Updated Generic Page Header, updated Bridge screens. * Fixed token icons. * Bridge: Updated styles. * Updated tooltips. * Removed unused token images. * Refactored due to PR comments. Co-authored-by: Nikita-Polyakov Co-authored-by: Stefan Popov * Fix/pss 539 metamsk lock issue (#108) * improve subscribers * add check account is connected * Fix/balance flickering (#109) * wip update balance flow * refactoring views and store modules * remove unused code * fixes after review * Update yarn.lock * Updated wallet version. * Updated wallet version to 0.6.4. * Updated wallet version to 0.6.5. * PSS-540: Add Pending Transactions to Bridge History (#115) * pss-498 header redesign * wip pss-496 * style fixes * add HelpDialog component * reexport package.json * exchange routing fix * add Rewards stub with coming soon text * refactoring SidebarItemContent * refactoring styles * add FAUCET_URL to env.json * fixes after review * Move bridge functionality * Bridge: Updated unauthorized routes. * Updated Generic Page Header, updated Bridge screens. * Fixed token icons. * Bridge: Updated styles. * Updated tooltips. * Removed btc icon. * Updated due to PR comments. * Updated due to PR comments. * Reverted formatAddress changes. * Added pending state. * Updated wallet version. * Fix bridge functionality Co-authored-by: Nikita-Polyakov Co-authored-by: Stefan Popov Co-authored-by: Alex Natalia * Select dialog updates (#118) * Modify select dialog * Remove all symbol dependencies * PSS-502: Swap And Pool Redesign (#117) * Separated Swap and Pool. * Changed assets filter from symbol to address. * Updated wallet version to 0.7.1. * Fixed assets addresses behaviour for bridge. * Reverted previous version of the wallet, fixed some places due to PR comments. Co-authored-by: Alex Natalia * Update styles and icons (#119) * Fix styles and icons * Update BrandedTooltip.vue * Update wallet & ui library versions * Update LICENSE * Update package.json * Fix issues Co-authored-by: Stefan Popov Co-authored-by: Alex Natalia <38787212+alexnatalia@users.noreply.github.com> Co-authored-by: Alex Natalia * Redesign Updates (#120) * Refactored buttons styles, changed some translation to common one. * Updated tooltips, screens info area. * Updated info blocks. * Updated info blocks in confirmation and pool screens. * Combined input area styles. * Update About.vue * GenericPageHeader: Changed default prop of tooltip placement. Signed-off-by: alexnatalia Co-authored-by: Stefan Popov * update wallet to 0.7.4 (#121) * remove getAssets from select-token dialog (#123) * PSS-573 WEB UI. MAX button for bridge work incorrect. (#124) * fix calc max value * remove console.log * update wallet 0.7.7 & hide farming in menu * refactoring (#122) * Fix issues (#125) * Remove default values from props * Fix issues Co-authored-by: alexnatalia Co-authored-by: Aleksandr Makhnev Co-authored-by: Bulat Saifullin Co-authored-by: Alex Natalia <38787212+alexnatalia@users.noreply.github.com> Co-authored-by: Dmitriy Creed Co-authored-by: alexnatalia Co-authored-by: Nikita Polyakov Co-authored-by: Nikita-Polyakov Co-authored-by: Nikita Polyakov <53777036+Nikita-Polyakov@users.noreply.github.com> Co-authored-by: Alex Natalia * Release 0.1.5 (#158) * Release 0.1.5 (#161) * Release 0.1.6 (#170) * Release 0.1.6 (#174) * Release 0.1.7 (#190) * Release 0.1.8 (#200) * Release 0.1.9 (#206) * Release 1.0.0 (#208) * Update styles * Update wallet * Fix wait message for bridge eth->sora flow * Fix page amount for bridge * Fix bridge icons * Fix swap checks for XOR output without XOR or with XOR balance < network fee * Release 1.0.0 (#212) * Release 1.0.0 (#215) * Release 1.0.0 (#219) * Release 1.0.1 (#226) * Release 1.0.2 (#234) * Release 1.1.0 (#244) * PSS-281: Recalculate Input Values On Select Token (#33) * Added util method to check isNumber value. Removed Max button from token To area. * Added Max sold for reversed swap. * Updated Swap Integration. * Updated UI Lib version. * Added recalc on Select Token. * Fixed Swap for Polkadot.js * Updated isExchangeB param in methods. * Hid Node Address area for Settings popup. * Added Network Fee field to Swap component. * Updated Custom slippage tolerance for Settings. * Fixed paste string value to Swap fields. * Updated Network Fee calls, updated Wallet version, fixed swap tokens balance. * Added isExchangeB parameter to swap call. * Refactoring * fix total supply * PSS-129: Share of pool * Remove share of pool mock * Fix get asset symbol * Hide add liquidity Fix slippage tolerance for add liquidity Fix share of pool Fix unsupprted assets error message * Disable max button for add liquidity Reset values after change tokens * Fixes * Updated Tokens Icons, added PAL icon. (#35) * Wallet connection issues (#38) * Fix wallet connection issues * Fix styles * Update wallet version * Update favicon.ico * PSS-297: check fee on max amount * PSS-295: Added Insufficient Balance Checking (#37) * Added Insufficient balance checking. * Updated FPNumber parameters. * Removed formatNumber usage from Swap screens. * Fixed focus and placeholders values for Swap. * Updated some styles for huge number values. * Refactored due to PR comments. * Result Dialog Styles Fix (#41) * Fixed Result Dialog button styles. * Renamed USD icon. * Update library * Fix swap, liquidity behavior * Update index.ts * TODO: Revert this commit after PSS-309 * Updated wallet version. Co-authored-by: Stefan Popov * PSS-273: WEB UI: Connect Wallet - Close button leads always on Exchange page, not to the previous page (#42) * Fix routing issue * Update wallet version * PSS-295: Confirm Swap Insufficient Balance Checking (#43) * Fixed console error on tokens switch. * Added Is Insufficient Balance checking for Confirm Swap dialog. * Updated Confirm Swap styles. * Updated Swap info after Swap, added max button to init screen. (#44) * Update ui library version (#46) * Update ui library version * Update wallet * BP-312: Fixes for pool * Fix icons position (#47) * Fix icons position * Fix logo * PSS-287: Swap Amount Fields Formatting (#45) * Added Swap fields formatter. * Fixed Slippage Tolerance editing and Swap fields formatting. * Updated wallet version. * Change toString to toFixed * Change formatNumber to toFixed * Fix remove liquidity price * Move back toFixed to toString * Fixed estimated label existence for zero values (#50) * Refactored, added some comments, fixed estimated label existence for zero values. * Modify env config file (#49) Co-authored-by: Bulat Saifullin * Add custom notifications & notification tracking service (#51) * Add custom notifications & notification tracking service * Update notifications & strings according to latest changes * Update api * Update soramitsu-variables.scss * PSS-335: Designer Feedback Fixes FE (#53) * Fixed functionality and layout bugs. * Added draft component to fix layout behaviour. * Fixed Settings behaviour. * Swap: removed Result dialog, edited Network Fee tooltip. * Fixed translation bugs. * Account info implementation & fix loading state (#54) * Add account info * Fix styles * Hide test assets (#55) * Update connection * Remove usdt mock * Add liquidity issues & update notifications (#56) * Add missing notifications * Update RemoveLiquidity * Fix add liquidity screen * Add async loading of liquidity * Fix pool issues * Updated not connected pool interface message. (#60) * PSS-300: Swap confirmation dialog message update (#61) * Updated Swap confirmation dialog message. * Confirm Swap Dialog: Updated message for max sold behaviour. * Swap screen: Fixed Min Received/Max Sold area asset symbol. (#62) * PSS-379: WEB UI. Add liquidity. Click MAX button on 0 balance of XOR (#59) * Updated wallet version. Swap, Add Liquidity, Create Pair components: Updated Max button availability, refactored. * Refactored due to PR comments. * Swap, Add Liquidity: Fixed negative amount after max. Updated wallet version. * Create pair implementation & fix liquidity issues (#63) * Add create pair implementation & fix logic for add liquidity * PSS-297: WEB UI: Restrict Adding liquidity if balance is insufficient (#64) * Add Liquidity: Refactored Insufficient Balance. * Create Pair, Remove Liquidity: Updated Max functionality. * Add insufficient liquidity message for swap (#66) * link @soramitsu/soraneo-wallet-web 0.4.6 * return network address * use wallet routes in app.vue to correctly handle wallet icon click * set changePage method as private * removed local model for inputs: createPairModel * refactoring CreatePair methods * add input maxlength check * fix inputMaxLength method * improve formatNumberField method * refactoring inputMaxLength method * refactoring AddLiquidity view * create TokenPair mixin * wip refactoring * add maxlength to removeLiquidity view inputs * create TokenInputMixin * add input handlers on removeLiquidity view * handle swap inputs * return commented line * PSS-400: WEB UI. Minimum receive/Maximum sold token not changed (#69) * Fixed min received/max sold symbol. * Update wallet & api version (#70) * fixes after review * add store state interfaces * PSS-467: On the swap screen user should be able to select all tokens excecpt pool tokens (#71) * Update wallet & api version * Fix swap with assets created by user * Update wallet & api version * add watcher for slippageTolerance in Swap.vue * remove console lgos * use state types in store mutations & getters * apply transaction mixin changes from wallet * update @soramitsu/soraneo-wallet-web dependency * navigate to wallet connection view on wallet click (#75) * PSS-419: restrict precision in inputs (#74) * add TokenInput component * use TokenInput in Swap.vue * add ConfirmDialogMixin * prepare to refactoring modals * remove comments * remove unneccessary actions * add TODO comments * fix TokenInput handler * link js-ui-library with input fix * PSS-398: WEB UI. Multiple click on Confirm - create multiple transactions. (#76) * Fix multiple confirm for operations * Fix notifications view * Update env.json * PSS-364: reuse s-float-input component (#77) * prepare TokenInput component for export * use s-float-input instead of TokenInput * refactoring Settings component * refactoring RemoveLiquidity * Update wallet (#79) * SFloatInput Fixes (#82) * Reseted values and tokens for Add Liquidity and Create Pair components, added placeholders for all SFloatInput elements. * PSS-378: WEB UI. Remove liquidity. Troubles with entering of amount manually (#83) * Reseted values and tokens for Add Liquidity and Create Pair components, added placeholders for all SFloatInput elements. * Remove liquidity: fixed fields editing and insufficient balance calculation. * Remove Liquidity: Fixed editing behaviour. * Updated due to PR comments. * PSS-486: reset vuex values after transaction (#81) * PSS-351: Show balance in select token dialog (#84) * wip assetList * fixes in swap * fix types * remove unused imports * Refactoring Modals: add ConfirmTokenPairDialog component (#78) * add ConfirmTokenPairDialog component * add modal props fix and throw error on create pair failure * fix openSelectTokenDialog method in Swap.vue(#86) * PSS-350: Add clear button to select token search input (#85) * add clear button * refactoring mixin * remove global style in SelectToken * use global style for input button * Update wallet (#87) * Update wallet * Change s-form-item to div in SelectToken dialog (#88) * remove s-form-item * change wrapper classname * Refactoring swap view (#89) * wip * remove formModel * add reset fields method * wip swap values * refactoring minMaxRecieved calls * wip refactoring * use exchangeB as source of truth * use isExchangeB instead of activeField * disable switch during values calculation * recounting check * use promise all for parallel calculation * update ui library * discarding env.json * fixes after revie * Hide balance in SelectToken dialog, if wallet not connected (#91) * Add license (#92) * PSS-248 Web UI: Settings - Problems with input in Custom field (#90) * allow type any value * fix error * add local model * PSS-418: Precision management (#93) * Create NumberFormatterMixin.ts * Improve precision management for pool * Improve precision management for swap operation * Improve precision management for select token dialog * Update AddLiquidity.vue * Improve precision management for remove liquidity operation * Update todo sections * Fix issues * Update wallet & api versions * Add balance updates * Add zero string const * update wallet (#94) * PSS-351 Select Token fixes (#95) * select-token fixes * show 0 balance as - * PSS-516: WEB UI. Can go to remove liquidity page without liquidity on account (#96) * Added Page Not Found Draft. * Fixed Add and Remove Liquidity router bags, hid some screens for unauthorized access. Added redirect to exchange for Page Not Found error. * Disabled selects for existed liquidity addition. * Update Swap.vue (#99) * Add namespace & types for swap (#101) * Fix price and swap info (#104) * Fix price calculations * Update SwapInfo.vue * Update wallet & api (#105) * Fix swap links (#106) * Fix swap links * Update wallet * Update api (#111) * up wallet version (#112) * Updated wallet version to 0.6.3 (#113) * Updated wallet version to 0.6.4. (#114) * Polkaswap layout redesign (#98) (#102) * Polkaswap layout redesign (#98) * pss-498 header re… * Update App.vue (#1450) * Update App.vue * Update App.vue * show start params * Update App.vue * Update App.vue * Update App.vue * Update App.vue * Update App.vue * Update Burn.vue * Improve TMA * Update telegram.ts --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Fix subsquid (#1454) * Fix subsquid issues (#1453) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Update package.json --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Update App.vue (#1455) * Update App.vue * update wallet * Update RewardsTabs.vue * fix with ref double * fix tabs rerender * Fix lint --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Add error handling for tma (#1452) * Add error handling for tma * Check files download via TG * Update deps * Add logs * Update package.json * Update tg api * Update telegram.ts * Try files download * Try tryBrowser * tryInstantView * Try a tag * Update lokalise * Download from lokalise * Update ReferralProgram.vue --------- Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> * Update env.json --------- Signed-off-by: Nikita Zaporozhets Signed-off-by: BAStos525 Co-authored-by: RDMStreet Co-authored-by: Nikita Polyakov <53777036+Nikita-Polyakov@users.noreply.github.com> Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> Co-authored-by: Nikita-Polyakov Co-authored-by: NaghmeMohammadifar <45916098+Naghme98@users.noreply.github.com> Co-authored-by: C4tWithShell Co-authored-by: marat-biriushev <49524488+marat-biriushev@users.noreply.github.com> Co-authored-by: Rustem Co-authored-by: Vladimir Shelkovnikov <99356504+C4tWithShell@users.noreply.github.com> Co-authored-by: shlavik Co-authored-by: f33r0 <95526886+f33r0@users.noreply.github.com> Co-authored-by: Kron1749 <70746258+Kron1749@users.noreply.github.com> Co-authored-by: alexnatalia Co-authored-by: Aleksandr Makhnev Co-authored-by: Bulat Saifullin Co-authored-by: Alex Natalia <38787212+alexnatalia@users.noreply.github.com> Co-authored-by: Dmitriy Creed Co-authored-by: alexnatalia Co-authored-by: Nikita Polyakov Co-authored-by: Alex Natalia Co-authored-by: Pavel Golovkin Co-authored-by: Pavel Co-authored-by: Pobepto Co-authored-by: Tarmo Vannas Co-authored-by: 武宮誠 Co-authored-by: Denis Nikiforov <45266099+DenisNikiforov@users.noreply.github.com> Co-authored-by: Ahmed Elkashef Co-authored-by: Nikita Zaporozhets Co-authored-by: sunlucky163 Co-authored-by: sunlucky163 <44086186+sunlucky163@users.noreply.github.com> Co-authored-by: Bao Tran Co-authored-by: Bao Nguyen Tran Co-authored-by: Pavel Varfolomeev Co-authored-by: wpi86 <86880521+wpi86@users.noreply.github.com> Co-authored-by: Pavel Varfolomeev Co-authored-by: German Vechtomov <89127595+ox7a59@users.noreply.github.com> Co-authored-by: frodan Co-authored-by: Daniil Fronts Co-authored-by: BAStos525 Co-authored-by: BAStos525 <66615487+BAStos525@users.noreply.github.com> Co-authored-by: Aleksey Kazakov Co-authored-by: William Richter <88400283+WRRicht3r@users.noreply.github.com> Co-authored-by: Timofey Trepalin Co-authored-by: Maksim Baranov <33489381+MaksimBaranov98@users.noreply.github.com> Co-authored-by: timofeytrepalin <97504184+timofeytrepalin@users.noreply.github.com> Co-authored-by: Aleksandr Iakimov Co-authored-by: safinsaf <45899673+safinsaf@users.noreply.github.com> --- env.json | 1 + package.json | 6 +- public/env.json | 1 + src/App.vue | 31 +++--- src/components/App/Header/AppHeaderMenu.vue | 7 +- .../pages/Referrals/ConfirmInviteUser.vue | 1 + src/consts/index.ts | 2 + src/lang/cs.json | 7 +- src/lang/de.json | 7 +- src/lang/en.json | 7 +- src/lang/es.json | 7 +- src/lang/fr.json | 7 +- src/lang/hr.json | 7 +- src/lang/hu.json | 7 +- src/lang/hy.json | 7 +- src/lang/id.json | 7 +- src/lang/it.json | 7 +- src/lang/messages.ts | 4 + src/lang/nl.json | 7 +- src/lang/no.json | 7 +- src/lang/pl.json | 7 +- src/lang/ru.json | 7 +- src/lang/sk.json | 7 +- src/lang/sr.json | 7 +- src/lang/sv.json | 7 +- src/lang/vi.json | 7 +- src/lang/yo.json | 7 +- src/lang/zh_CN.json | 7 +- src/store/settings/mutations.ts | 6 ++ src/store/settings/state.ts | 2 + src/store/settings/types.ts | 2 + src/styles/soramitsu-variables.scss | 3 + src/utils/index.ts | 2 - src/utils/telegram.ts | 100 ++++++++++++++++++ src/views/Burn.vue | 2 +- src/views/ReferralProgram.vue | 35 +++++- src/views/RewardsTabs.vue | 15 ++- yarn.lock | 16 +-- 38 files changed, 300 insertions(+), 76 deletions(-) create mode 100644 src/utils/telegram.ts diff --git a/env.json b/env.json index 2d21da61f..81dee76f9 100644 --- a/env.json +++ b/env.json @@ -17,6 +17,7 @@ }, "SUBQUERY_ENDPOINT": "https://api.subquery.network/sq/sora-xor/sora-prod", "SUBSQUID_ENDPOINT": "https://squid.subsquid.io/sora/graphql", + "TG_BOT_URL": "t.me/polkaswap_io_bot", "DEFAULT_NETWORKS": [ { "chain": "SORA", diff --git a/package.json b/package.json index 6ddd0be60..a591e85d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "polkaswap-exchange-web", - "version": "1.38.2", + "version": "1.38.3", "repository": { "type": "git", "url": "https://github.com/sora-xor/polkaswap-exchange-web.git" @@ -28,8 +28,8 @@ "dependencies": { "@cedelabs/widgets-universal": "^1.3.1", "@metamask/detect-provider": "^2.0.0", - "@soramitsu/soraneo-wallet-web": "1.38.7", - "@tma.js/sdk": "^2.4.0", + "@soramitsu/soraneo-wallet-web": "1.38.8", + "@tma.js/sdk": "^2.7.0", "@walletconnect/ethereum-provider": "^2.13.3", "@walletconnect/modal": "^2.6.2", "core-js": "^3.37.1", diff --git a/public/env.json b/public/env.json index ebabc5eb5..30c5c36d6 100644 --- a/public/env.json +++ b/public/env.json @@ -16,6 +16,7 @@ "assetOwner": false }, "FAUCET_URL": "https://faucet.dev.sora2.tachi.soramitsu.co.jp/", + "TG_BOT_URL": "t.me/PolkaswapDevBot", "DEFAULT_NETWORKS": [ { "chain": "SORA-dev Testnet #1", diff --git a/src/App.vue b/src/App.vue index fa48d12c2..f4bf72127 100644 --- a/src/App.vue +++ b/src/App.vue @@ -53,7 +53,7 @@ import { initWallet, waitForCore, } from '@soramitsu/soraneo-wallet-web'; -import { isTMA, setDebug } from '@tma.js/sdk'; +import { isTMA } from '@tma.js/sdk'; import debounce from 'lodash/debounce'; import { Component, Mixins, Watch } from 'vue-property-decorator'; @@ -69,6 +69,7 @@ import router, { goTo, lazyComponent } from '@/router'; import { action, getter, mutation, state } from '@/store/decorators'; import { getMobileCssClasses, preloadFontFace, updateDocumentTitle } from '@/utils'; import type { NodesConnection } from '@/utils/connection'; +import { TmaSdk } from '@/utils/telegram'; import type { FeatureFlags } from './store/settings/types'; import type { EthBridgeSettings, SubNetworkApps } from './store/web3/types'; @@ -108,8 +109,9 @@ export default class App extends Mixins(mixins.TransactionMixin, NodeErrorMixin) @state.settings.appConnection private appConnection!: NodesConnection; @state.settings.browserNotifPopupVisibility private browserNotifPopup!: boolean; @state.settings.browserNotifPopupBlockedVisibility private browserNotifPopupBlocked!: boolean; - @state.wallet.account.assetsToNotifyQueue assetsToNotifyQueue!: Array; + @state.referrals.referrer private referrer!: string; @state.referrals.storageReferrer storageReferrer!: string; + @state.wallet.account.assetsToNotifyQueue assetsToNotifyQueue!: Array; @state.settings.disclaimerVisibility disclaimerVisibility!: boolean; @state.router.loading pageLoading!: boolean; @@ -154,9 +156,10 @@ export default class App extends Mixins(mixins.TransactionMixin, NodeErrorMixin) @state.wallet.transactions.isSignTxDialogVisible public isSignTxDialogVisible!: boolean; @mutation.wallet.transactions.setSignTxDialogVisibility public setSignTxDialogVisibility!: (flag: boolean) => void; - // [DESKTOP] To Enable Desktop @mutation.wallet.account.setIsDesktop private setIsDesktop!: (v: boolean) => void; + // [TMA] To Enable TMA + @mutation.settings.enableTMA private enableTMA!: FnWithoutArgs; @Watch('assetsToNotifyQueue') private handleNotifyOnDeposit(whitelistAssetArray: WhitelistArrayItem[]): void { @@ -197,16 +200,17 @@ export default class App extends Mixins(mixins.TransactionMixin, NodeErrorMixin) } private async confirmInvititation(): Promise { - await this.getReferrer(); - if (this.storageReferrer) { + await this.withApi(async () => { + await this.getReferrer(); + if (!this.storageReferrer) { + return; + } if (this.storageReferrer === this.account.address) { this.resetStorageReferrer(); - } else { - this.withApi(() => { - this.showConfirmInviteUser = true; - }); + } else if (!this.referrer) { + this.showConfirmInviteUser = true; } - } + }); } private setResponsiveClass(): void { @@ -216,9 +220,6 @@ export default class App extends Mixins(mixins.TransactionMixin, NodeErrorMixin) private setResponsiveClassDebounced = debounce(this.setResponsiveClass, 250); async created() { - // [DESKTOP] To Enable Desktop - // this.setIsDesktop(true); - // element-icons is not common used, but should be visible after network connection lost preloadFontFace('element-icons'); this.setResponsiveClass(); @@ -236,9 +237,9 @@ export default class App extends Mixins(mixins.TransactionMixin, NodeErrorMixin) // To start running as Telegram Web App (desktop capabilities) if (await isTMA()) { + this.enableTMA(); this.setIsDesktop(true); - // sets debug mode in twa - if (data.NETWORK_TYPE === WALLET_CONSTS.SoraNetwork.Dev) setDebug(true); + await TmaSdk.init(data?.TG_BOT_URL, data.NETWORK_TYPE === WALLET_CONSTS.SoraNetwork.Dev); } await this.setApiKeys(data?.API_KEYS); diff --git a/src/components/App/Header/AppHeaderMenu.vue b/src/components/App/Header/AppHeaderMenu.vue index 794d504e7..016d1c174 100644 --- a/src/components/App/Header/AppHeaderMenu.vue +++ b/src/components/App/Header/AppHeaderMenu.vue @@ -43,6 +43,7 @@ import { Component, Mixins } from 'vue-property-decorator'; import TranslationMixin from '@/components/mixins/TranslationMixin'; import { getter, mutation, state } from '@/store/decorators'; +import { TmaSdk } from '@/utils/telegram'; import type { Currency } from '@soramitsu/soraneo-wallet-web/lib/types/currency'; @@ -177,13 +178,15 @@ export default class AppHeaderMenu extends Mixins(TranslationMixin) { dropdown.visible ? dropdown.hide() : dropdown.show(); } - handleSelectHeaderMenu(value: HeaderMenuType): void { + async handleSelectHeaderMenu(value: HeaderMenuType): Promise { switch (value) { case HeaderMenuType.HideBalances: this.toggleHideBalance(); break; case HeaderMenuType.Theme: - switchTheme(); + await switchTheme(); + await this.$nextTick(); + TmaSdk.updateTheme(); break; case HeaderMenuType.Language: this.setLanguageDialogVisibility(true); diff --git a/src/components/pages/Referrals/ConfirmInviteUser.vue b/src/components/pages/Referrals/ConfirmInviteUser.vue index 8105756d5..2d781660d 100644 --- a/src/components/pages/Referrals/ConfirmInviteUser.vue +++ b/src/components/pages/Referrals/ConfirmInviteUser.vue @@ -32,6 +32,7 @@ import { Component, Mixins, Watch } from 'vue-property-decorator'; import { state, mutation } from '@/store/decorators'; +// TODO: [Rustem] remove hasReferrer logic (localise) @Component({ components: { DialogBase: components.DialogBase }, }) diff --git a/src/consts/index.ts b/src/consts/index.ts index 2f1a22ba3..5d18807ee 100644 --- a/src/consts/index.ts +++ b/src/consts/index.ts @@ -546,4 +546,6 @@ export const TranslationConsts = { VAL: 'VAL', Kensetsu: 'Kensetsu', LTV: 'LTV', + Telegram: 'Telegram', + DEX: 'DEX', } as const; diff --git a/src/lang/cs.json b/src/lang/cs.json index 9347e74e6..57c42d790 100644 --- a/src/lang/cs.json +++ b/src/lang/cs.json @@ -938,7 +938,8 @@ "bondMore": "Vázat více", "bond": "Vázat", "unbond": "Zrušit vazbu", - "copyLink": "Kopírovat odkaz" + "copyLink": "Kopírovat odkaz", + "shareLink": "Sdílet" }, "transactionDetails": "Detaily transakce", "receivedRewards": "Přijaté odměny", @@ -970,7 +971,9 @@ "info": "Když zaplatíte poplatek za transakci,10% dostane váš referrer", "referredLablel": "Doporučená adresa" }, - "insufficientBondedAmount": "Chcete-li pozvat více doporučení, spojte alespoň {inviteUserFee} XOR" + "insufficientBondedAmount": "Chcete-li pozvat více doporučení, spojte alespoň {inviteUserFee} XOR", + "inviteViaTelegram": "Pozvat přes {Telegram}", + "welcomeMessage": "\nPřipojte se ke mně na {Polkaswap}!\n\nObjevte stylový {DEX}, který vám umožní vyměňovat desítky tokenů s křížovými řetězovými swapmi, knihou objednávek a spoustou odměn!\n\n🎁 Pozvěte přátele a získejte 10% z jejich obchodních poplatků\n\nUvidíme se tam!" }, "transactionDetailsText": "Detaily transakce", "code": { diff --git a/src/lang/de.json b/src/lang/de.json index 53a03916d..dd177bf32 100644 --- a/src/lang/de.json +++ b/src/lang/de.json @@ -938,7 +938,8 @@ "bondMore": "Mehr bonden", "bond": "Bond", "unbond": "Unbond", - "copyLink": "Link kopieren" + "copyLink": "Link kopieren", + "shareLink": "Teilen" }, "transactionDetails": "Transaktionsdetails", "receivedRewards": "Erhaltene Belohnungen", @@ -970,7 +971,9 @@ "info": "Wenn du eine Transaktionsgebühr zahlst,gehen 10% an deinen Referrer", "referredLablel": "Empfohlene Adresse" }, - "insufficientBondedAmount": "Um weitere Empfehlungen zu veschicken, bonde mindestens {inviteUserFee} XOR" + "insufficientBondedAmount": "Um weitere Empfehlungen zu veschicken, bonde mindestens {inviteUserFee} XOR", + "inviteViaTelegram": "Einladen über {Telegram}", + "welcomeMessage": "\nKomm zu mir auf {Polkaswap}!\n\nEntdecke den stylischen {DEX}, mit dem du Dutzende Token mit Cross-Chain-Swaps, Orderbuch und vielen Belohnungen tauschen kannst!\n\n🎁 Lade Freunde ein und verdiene 10% ihrer Handelsgebühren\n\nBis dann!" }, "transactionDetailsText": "Transaktionsdetails", "code": { diff --git a/src/lang/en.json b/src/lang/en.json index 98cd97d77..f790621ad 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -938,7 +938,8 @@ "bondMore": "Bond More", "bond": "Bond", "unbond": "Unbond", - "copyLink": "Copy link" + "copyLink": "Copy link", + "shareLink": "Share" }, "transactionDetails": "Transaction Details", "receivedRewards": "Received rewards", @@ -970,7 +971,9 @@ "info": "When you’ll pay a fee for transaction,10% will go to your referrer", "referredLablel": "Referred address" }, - "insufficientBondedAmount": "To invite more referrals, bond at least {inviteUserFee} XOR" + "insufficientBondedAmount": "To invite more referrals, bond at least {inviteUserFee} XOR", + "inviteViaTelegram": "Invite via {Telegram}", + "welcomeMessage": "\nJoin me on {Polkaswap}!\n\nDiscover the stylish {DEX} that lets you swap over dozens tokens with cross-chain swaps, order book, and plenty of rewards!\n\n🎁 Invite friends and earn 10% of their trading fees\n\nSee you there!" }, "transactionDetailsText": "Transaction Details", "code": { diff --git a/src/lang/es.json b/src/lang/es.json index 092229bc9..06606fd6b 100644 --- a/src/lang/es.json +++ b/src/lang/es.json @@ -938,7 +938,8 @@ "bondMore": "Vincular más", "bond": "Vinculación", "unbond": "Desvinculación", - "copyLink": "Copiar enlace" + "copyLink": "Copiar enlace", + "shareLink": "Compartir" }, "transactionDetails": "Detalles de la transacción", "receivedRewards": "Recompensas recibidas", @@ -970,7 +971,9 @@ "info": "Cuando pague una tarifa por la transacción,el 10% se destinará a su referente", "referredLablel": "Dirección de referencia" }, - "insufficientBondedAmount": "Para invitar a más referidos, vincular al menos {inviteUserFee} XOR" + "insufficientBondedAmount": "Para invitar a más referidos, vincular al menos {inviteUserFee} XOR", + "inviteViaTelegram": "Invitar a través de {Telegram}", + "welcomeMessage": "\n¡Únete a mí en {Polkaswap}!\n\nDescubre el elegante {DEX} que te permite intercambiar docenas de tokens con intercambios entre cadenas, libro de órdenes y muchas recompensas!\n\n🎁 Invita a tus amigos y gana el 10% de sus tarifas de comercio\n\n¡Nos vemos allí!" }, "transactionDetailsText": "Detalles de la transacción", "code": { diff --git a/src/lang/fr.json b/src/lang/fr.json index bcaba7097..29ce7ba5a 100644 --- a/src/lang/fr.json +++ b/src/lang/fr.json @@ -938,7 +938,8 @@ "bondMore": "Lier Plus", "bond": "Lier", "unbond": "Délier", - "copyLink": "Copier le lien" + "copyLink": "Copier le lien", + "shareLink": "Partager" }, "transactionDetails": "Détails de la Transaction", "receivedRewards": "Récompenses reçues", @@ -970,7 +971,9 @@ "info": "Lorsque vous paierez des frais pour la transaction,10% iront à votre parrain", "referredLablel": "Adresse référencée" }, - "insufficientBondedAmount": "Pour inviter plus de références, liez au moins {inviteUserFee} XOR" + "insufficientBondedAmount": "Pour inviter plus de références, liez au moins {inviteUserFee} XOR", + "inviteViaTelegram": "Inviter via {Telegram}", + "welcomeMessage": "\nRejoignez-moi sur {Polkaswap} !\n\nDécouvrez le {DEX} élégant qui vous permet d'échanger des dizaines de jetons avec des swaps inter-chaînes, un carnet de commandes et plein de récompenses !\n\n🎁 Invitez des amis et gagnez 10% de leurs frais de trading\n\nÀ bientôt !" }, "transactionDetailsText": "Détails de la transaction", "code": { diff --git a/src/lang/hr.json b/src/lang/hr.json index 29812a900..0f6ee0c50 100644 --- a/src/lang/hr.json +++ b/src/lang/hr.json @@ -938,7 +938,8 @@ "bondMore": "Bond više", "bond": "Bond", "unbond": "Unbond", - "copyLink": "Kopirajte link" + "copyLink": "Kopirajte link", + "shareLink": "Podijeli" }, "transactionDetails": "Detalji transakcije", "receivedRewards": "Primljene nagrade", @@ -970,7 +971,9 @@ "info": "Kada platite naknadu za transakciju, 10% će ići vašem refereru", "referredLablel": "Preporučena adresa" }, - "insufficientBondedAmount": "Da biste pozvali više preporuka, povežite najmanje {inviteUserFee} XOR" + "insufficientBondedAmount": "Da biste pozvali više preporuka, povežite najmanje {inviteUserFee} XOR", + "inviteViaTelegram": "Pozovi putem {Telegram}", + "welcomeMessage": "\nPridruži mi se na {Polkaswap}!\n\nOtkrij stilizirani {DEX} koji ti omogućuje zamjenu desetaka tokena s međulančanim zamjenama, knjigom narudžbi i mnoštvom nagrada!\n\n🎁 Pozovi prijatelje i zaradi 10% njihovih trgovačkih naknada\n\nVidimo se tamo!" }, "transactionDetailsText": "Detalji transakcije", "code": { diff --git a/src/lang/hu.json b/src/lang/hu.json index 1b4945493..7050a77de 100644 --- a/src/lang/hu.json +++ b/src/lang/hu.json @@ -938,7 +938,8 @@ "bondMore": "Több lekötése", "bond": "Lekötés", "unbond": "Feloldás", - "copyLink": "Link másolása" + "copyLink": "Link másolása", + "shareLink": "Megosztás" }, "transactionDetails": "Tranzakció részletei", "receivedRewards": "Kapott jutalmak", @@ -970,7 +971,9 @@ "info": "Amikor tranzakciós díjat fizet, a 10%-ot kap az ajánlója.", "referredLablel": "Ajánlói cím" }, - "insufficientBondedAmount": "További hivatkozások meghívásához legalább {inviteUserFee} XOR" + "insufficientBondedAmount": "További hivatkozások meghívásához legalább {inviteUserFee} XOR", + "inviteViaTelegram": "Meghívás {Telegram}-on keresztül", + "welcomeMessage": "\nCsatlakozz hozzám a {Polkaswap}-on!\n\nFedezd fel a stílusos {DEX}-et, amely lehetővé teszi, hogy több tucat tokent cserélj kereszthálózati cserékkel, rendelési könyvvel és rengeteg jutalommal!\n\n🎁 Hívd meg barátaidat, és keresd meg a kereskedési díjaik 10%-át\n\nTalálkozunk ott!" }, "transactionDetailsText": "Tranzakció részletei", "code": { diff --git a/src/lang/hy.json b/src/lang/hy.json index 45eba3eab..95fe46ac3 100644 --- a/src/lang/hy.json +++ b/src/lang/hy.json @@ -938,7 +938,8 @@ "bondMore": "Բոնդ Ավելին", "bond": "Բոնդ", "unbond": "Ունբոնդ", - "copyLink": "Պատճենել հղումը" + "copyLink": "Պատճենել հղումը", + "shareLink": "Կիսվել" }, "transactionDetails": "Գործարքի պարամետրերը", "receivedRewards": "Ստացել է պարգևներ", @@ -970,7 +971,9 @@ "info": "Երբ գործարքի համար վճար կվճարեք,10%-ը կգնա ձեր ուղղորդողին", "referredLablel": "Նշված հասցեն" }, - "insufficientBondedAmount": "Ավելի շատ referrals հրավիրելու համար, bond առնվազն {inviteUserFee} XOR" + "insufficientBondedAmount": "Ավելի շատ referrals հրավիրելու համար, bond առնվազն {inviteUserFee} XOR", + "inviteViaTelegram": "Հրավիրել {Telegram}-ով", + "welcomeMessage": "\nՄիացեք ինձ {Polkaswap}-ում!\n\nԲացահայտեք ոճային {DEX}-ը, որը թույլ է տալիս փոխանակել տասնյակ թոքեններ խաչաձև փոխանակումներով, պատվերների գրքով և բազմաթիվ պարգևներով!\n\n🎁 Հրավիրեք ընկերներին և վաստակեք նրանց առևտրային վճարների 10%-ը\n\nԿհանդիպենք այնտեղ!" }, "transactionDetailsText": "Գործարքի մանրամասները", "code": { diff --git a/src/lang/id.json b/src/lang/id.json index 7dda093f1..8f666b245 100644 --- a/src/lang/id.json +++ b/src/lang/id.json @@ -938,7 +938,8 @@ "bondMore": "Bond More", "bond": "Ikatan", "unbond": "Tidak terikat", - "copyLink": "Salin link" + "copyLink": "Salin link", + "shareLink": "Bagikan" }, "transactionDetails": "Rincian transaksi", "receivedRewards": "Hadiah yang diterima", @@ -970,7 +971,9 @@ "info": "Ketika Anda akan membayar biaya untuk transaksi,10% akan masuk ke perujuk Anda", "referredLablel": "Alamat yang dirujuk" }, - "insufficientBondedAmount": "Untuk mengundang lebih banyak rujukan, beri ikatan setidaknya {inviteUserFee} XOR" + "insufficientBondedAmount": "Untuk mengundang lebih banyak rujukan, beri ikatan setidaknya {inviteUserFee} XOR", + "inviteViaTelegram": "Undang melalui {Telegram}", + "welcomeMessage": "\nBergabunglah dengan saya di {Polkaswap}!\n\nTemukan {DEX} bergaya yang memungkinkan Anda menukar puluhan token dengan pertukaran lintas rantai, buku pesanan, dan banyak hadiah!\n\n🎁 Undang teman dan dapatkan 10% dari biaya perdagangan mereka\n\nSampai jumpa di sana!" }, "transactionDetailsText": "Detil transaksi", "code": { diff --git a/src/lang/it.json b/src/lang/it.json index 26cadf822..e5f5deffc 100644 --- a/src/lang/it.json +++ b/src/lang/it.json @@ -938,7 +938,8 @@ "bondMore": "Legare di più", "bond": "Riserva", "unbond": "Separare", - "copyLink": "Copia link" + "copyLink": "Copia link", + "shareLink": "Condividi" }, "transactionDetails": "Dettagli di Transazione", "receivedRewards": "Ricompense ricevute", @@ -970,7 +971,9 @@ "info": "Quando pagherai una commissione per la transazione,10% andrà al tuo referrer", "referredLablel": "Indirizzo di riferimento" }, - "insufficientBondedAmount": "Per invitare più referral, vincola almeno {inviteUserFee} XOR" + "insufficientBondedAmount": "Per invitare più referral, vincola almeno {inviteUserFee} XOR", + "inviteViaTelegram": "Invita via {Telegram}", + "welcomeMessage": "\nUnisciti a me su {Polkaswap}!\n\nScopri il {DEX} elegante che ti permette di scambiare decine di token con scambi cross-chain, libro degli ordini e molte ricompense!\n\n🎁 Invita amici e guadagna il 10% delle loro commissioni di trading\n\nCi vediamo lì!" }, "transactionDetailsText": "Dettagli di Transazione", "code": { diff --git a/src/lang/messages.ts b/src/lang/messages.ts index 5575ecec0..66b4e9f84 100644 --- a/src/lang/messages.ts +++ b/src/lang/messages.ts @@ -805,10 +805,14 @@ export default { bond: 'Bond', unbond: 'Unbond', copyLink: 'Copy link', + shareLink: 'Share', }, transactionDetails: 'Transaction Details', receivedRewards: 'Received rewards', invitationLink: 'Invitation link', + inviteViaTelegram: 'Invite via {Telegram}', + welcomeMessage: + '\nJoin me on {Polkaswap}!\n\nDiscover the stylish {DEX} that lets you swap over dozens tokens with cross-chain swaps, order book, and plenty of rewards!\n\n🎁 Refer friends and earn 10% of their trading fees\n\nSee you there!', successCopy: 'Referral link is copied to the clipboard', bondTitle: 'Bond XOR', unbondTitle: 'Unbond XOR', diff --git a/src/lang/nl.json b/src/lang/nl.json index 479d592d8..d3396cfb3 100644 --- a/src/lang/nl.json +++ b/src/lang/nl.json @@ -938,7 +938,8 @@ "bondMore": "Bond Meer", "bond": "Bond", "unbond": "Ontkoppelen", - "copyLink": "Kopieer link" + "copyLink": "Kopieer link", + "shareLink": "Delen" }, "transactionDetails": "Transactiegegevens", "receivedRewards": "Beloningen ontvangen", @@ -970,7 +971,9 @@ "info": "Wanneer u transactiekosten betaalt,gaat 10% naar uw verwijzer", "referredLablel": "Doorverwezen adres" }, - "insufficientBondedAmount": "Om meer verwijzingen uit te nodigen, bindt u ten minste {inviteUserFee} XOR" + "insufficientBondedAmount": "Om meer verwijzingen uit te nodigen, bindt u ten minste {inviteUserFee} XOR", + "inviteViaTelegram": "Uitnodigen via {Telegram}", + "welcomeMessage": "\nDoe met mij mee op {Polkaswap}!\n\nOntdek de stijlvolle {DEX} waarmee je tientallen tokens kunt wisselen met cross-chain swaps, orderboek en veel beloningen!\n\n🎁 Nodig vrienden uit en verdien 10% van hun handelskosten\n\nZie je daar!" }, "transactionDetailsText": "Transactie Details", "code": { diff --git a/src/lang/no.json b/src/lang/no.json index 4b971903b..b540cc399 100644 --- a/src/lang/no.json +++ b/src/lang/no.json @@ -938,7 +938,8 @@ "bondMore": "Bond mer", "bond": "Knytte bånd", "unbond": "Koble ut", - "copyLink": "Kopier link" + "copyLink": "Kopier link", + "shareLink": "Del" }, "transactionDetails": "Transaksjonsdetaljer", "receivedRewards": "Mottatte belønninger", @@ -970,7 +971,9 @@ "info": "Når du betaler et gebyr for transaksjonen,går 10% til henvisningsadressen din", "referredLablel": "Henvist adresse" }, - "insufficientBondedAmount": "Hvis du vil invitere flere henvisninger, binder du minst {inviteUserFee} XOR" + "insufficientBondedAmount": "Hvis du vil invitere flere henvisninger, binder du minst {inviteUserFee} XOR", + "inviteViaTelegram": "Inviter via {Telegram}", + "welcomeMessage": "\nBli med meg på {Polkaswap}!\n\nOppdag den stilige {DEX} som lar deg bytte dusinvis av tokens med cross-chain swaps, ordrebok og mange belønninger!\n\n🎁 Inviter venner og tjen 10% av deres handelsgebyrer\n\nVi sees der!" }, "transactionDetailsText": "Transaksjonsdetaljer", "code": { diff --git a/src/lang/pl.json b/src/lang/pl.json index 89de45654..d98f51377 100644 --- a/src/lang/pl.json +++ b/src/lang/pl.json @@ -938,7 +938,8 @@ "bondMore": "Więcej rezerw", "bond": "Utwórz rezerwy", "unbond": "Uwolnij rezerwy", - "copyLink": "Kopiuj link" + "copyLink": "Kopiuj link", + "shareLink": "Udostępnij" }, "transactionDetails": "Szczegóły transakcji", "receivedRewards": "Otrzymane wynagrodzenie", @@ -970,7 +971,9 @@ "info": "Kiedy zapłacisz opłatę za transakcję,10% trafi do Twojego polecającego", "referredLablel": "Polecony adres" }, - "insufficientBondedAmount": "Aby zaprosić więcej poleconych, zwiąż co najmniej {inviteUserFee} XOR" + "insufficientBondedAmount": "Aby zaprosić więcej poleconych, zwiąż co najmniej {inviteUserFee} XOR", + "inviteViaTelegram": "Zaproś przez {Telegram}", + "welcomeMessage": "\nDołącz do mnie na {Polkaswap}!\n\nOdkryj stylowy {DEX}, który umożliwia wymianę dziesiątek tokenów z cross-chain swaps, księgą zamówień i wieloma nagrodami!\n\n🎁 Zaproś znajomych i zarabiaj 10% ich opłat handlowych\n\nDo zobaczenia tam!" }, "transactionDetailsText": "Szczegóły transakcji", "code": { diff --git a/src/lang/ru.json b/src/lang/ru.json index e7c201f68..db7422bb4 100644 --- a/src/lang/ru.json +++ b/src/lang/ru.json @@ -938,7 +938,8 @@ "bondMore": "Внести еще", "bond": "Внести", "unbond": "Вывести", - "copyLink": "Копировать ссылку" + "copyLink": "Копировать ссылку", + "shareLink": "Поделиться" }, "transactionDetails": "Детали Транзакции", "receivedRewards": "Полученные награды", @@ -970,7 +971,9 @@ "info": "Когда вы платите комиссию за транзакцию,10% перейдет вашему рефереру", "referredLablel": "Адрес реферера" }, - "insufficientBondedAmount": "Чтобы приглашать больше пользователей, привяжите не менее {inviteUserFee} XOR" + "insufficientBondedAmount": "Чтобы приглашать больше пользователей, привяжите не менее {inviteUserFee} XOR", + "inviteViaTelegram": "Пригласить через {Telegram}", + "welcomeMessage": "\nПрисоединяйся ко мне на {Polkaswap}!\n\nОткрой для себя стильный {DEX}, который позволяет обменивать десятки токенов с кроссчейн обменами, книгой ордеров и множеством наград!\n\n🎁 Приглашай друзей и зарабатывай 10% от их торговых комиссий\n\nУвидимся там!" }, "transactionDetailsText": "Детали транзакции", "code": { diff --git a/src/lang/sk.json b/src/lang/sk.json index 184e55e69..314ba0747 100644 --- a/src/lang/sk.json +++ b/src/lang/sk.json @@ -938,7 +938,8 @@ "bondMore": "Bond viac", "bond": "Bond", "unbond": "Odpojiť", - "copyLink": "Skopírovať odkaz" + "copyLink": "Skopírovať odkaz", + "shareLink": "Zdieľať" }, "transactionDetails": "Detaily transakcie", "receivedRewards": "Prijaté odmeny", @@ -970,7 +971,9 @@ "info": "Keď zaplatíte poplatok za transakciu, 10 % dostane váš sprostredkovateľ", "referredLablel": "Odporúčaná adresa" }, - "insufficientBondedAmount": "Ak chcete pozvať ďalšie odporúčania, prepojte aspoň {inviteUserFee} XOR" + "insufficientBondedAmount": "Ak chcete pozvať ďalšie odporúčania, prepojte aspoň {inviteUserFee} XOR", + "inviteViaTelegram": "Pozvať cez {Telegram}", + "welcomeMessage": "\nPripojte sa ku mne na {Polkaswap}!\n\nObjavte štýlový {DEX}, ktorý vám umožňuje vymieňať desiatky tokenov s krížovými výmenami, knihou objednávok a množstvom odmien!\n\n🎁 Pozvite priateľov a získajte 10% z ich obchodných poplatkov\n\nUvidíme sa tam!" }, "transactionDetailsText": "Detaily transakcie", "code": { diff --git a/src/lang/sr.json b/src/lang/sr.json index 9e681660a..979c99bf0 100644 --- a/src/lang/sr.json +++ b/src/lang/sr.json @@ -938,7 +938,8 @@ "bondMore": "Veži više", "bond": "Veži", "unbond": "Razveži", - "copyLink": "Копирајте линк" + "copyLink": "Копирајте линк", + "shareLink": "Podeli" }, "transactionDetails": "Детаљи трансакције", "receivedRewards": "Примљене награде", @@ -970,7 +971,9 @@ "info": "Када платите накнаду за трансакцију, 10% ће отићи вашем referentu", "referredLablel": "Препоручена адреса" }, - "insufficientBondedAmount": "Da biste pozvali više preporuka, najmanje povežite {inviteUserFee} XOR" + "insufficientBondedAmount": "Da biste pozvali više preporuka, najmanje povežite {inviteUserFee} XOR", + "inviteViaTelegram": "Pozovi preko {Telegram}", + "welcomeMessage": "\nPridruži mi se na {Polkaswap}!\n\nOtkrij stajliš {DEX} koji ti omogućava da menjaš desetine tokena sa međulančanim menjanjem, knjigom narudžbina i mnoštvom nagrada!\n\n🎁 Pozovi prijatelje i zaradi 10% njihovih trgovačkih naknada\n\nVidimo se tamo!" }, "transactionDetailsText": "Детаљи трансакције", "code": { diff --git a/src/lang/sv.json b/src/lang/sv.json index 94df36be9..9ae1356ff 100644 --- a/src/lang/sv.json +++ b/src/lang/sv.json @@ -938,7 +938,8 @@ "bondMore": "Bond Mera", "bond": "Bond", "unbond": "Unbond", - "copyLink": "Kopiera länk" + "copyLink": "Kopiera länk", + "shareLink": "Dela" }, "transactionDetails": "Transaktions Detaljer", "receivedRewards": "Mottagna rewards", @@ -970,7 +971,9 @@ "info": "När du kommer att betala en avgift för transaktion så kommer10 % att gå till den som hänvisade dig", "referredLablel": "Hänvisad adress" }, - "insufficientBondedAmount": "För att bjuda in fler hänvisningar, bond minst {inviteUserFee} XOR" + "insufficientBondedAmount": "För att bjuda in fler hänvisningar, bond minst {inviteUserFee} XOR", + "inviteViaTelegram": "Bjud in via {Telegram}", + "welcomeMessage": "\nGå med mig på {Polkaswap}!\n\nUpptäck den stiliga {DEX} som låter dig byta ut dussintals tokens med cross-chain swaps, orderbok och massor av belöningar!\n\n🎁 Bjud in vänner och tjäna 10% av deras handelsavgifter\n\nVi ses där!" }, "transactionDetailsText": "Transaktions Detaljer", "code": { diff --git a/src/lang/vi.json b/src/lang/vi.json index b9217ddd6..95a06db2e 100644 --- a/src/lang/vi.json +++ b/src/lang/vi.json @@ -938,7 +938,8 @@ "bondMore": "Bond Thêm", "bond": "Bond", "unbond": "Unbond", - "copyLink": "Sao chép đường dẫn" + "copyLink": "Sao chép đường dẫn", + "shareLink": "Chia sẻ" }, "transactionDetails": "Chi tiết giao dịch", "receivedRewards": "Phần thưởng đã nhận", @@ -970,7 +971,9 @@ "info": "Khi bạn trả phí giao dịch, 10% sẽ được chuyển đến người giới thiệu của bạn", "referredLablel": "Địa chỉ giới thiệu" }, - "insufficientBondedAmount": "Để mời thêm giới thiệu, hãy bond ít nhất {inviteUserFee} XOR" + "insufficientBondedAmount": "Để mời thêm giới thiệu, hãy bond ít nhất {inviteUserFee} XOR", + "inviteViaTelegram": "Mời qua {Telegram}", + "welcomeMessage": "\nTham gia cùng tôi trên {Polkaswap}!\n\nKhám phá {DEX} phong cách cho phép bạn hoán đổi hàng chục mã thông báo với các giao dịch xuyên chuỗi, sổ lệnh và rất nhiều phần thưởng!\n\n🎁 Mời bạn bè và kiếm 10% phí giao dịch của họ\n\nHẹn gặp lại!" }, "transactionDetailsText": "Chi tiết giao dịch", "code": { diff --git a/src/lang/yo.json b/src/lang/yo.json index d5ad81249..1fa59156f 100644 --- a/src/lang/yo.json +++ b/src/lang/yo.json @@ -938,7 +938,8 @@ "bondMore": "Dipọ Die", "bond": "Dipọ", "unbond": "Yọọ", - "copyLink": "Daakọ ọna asopọ" + "copyLink": "Daakọ ọna asopọ", + "shareLink": "Pin" }, "transactionDetails": "Idunadura Awọn alaye", "receivedRewards": "Awọn ere ti o gba", @@ -970,7 +971,9 @@ "info": "Nigbati o ba san owo fun idunadura,10% yoo lọ si olutọkasi rẹ", "referredLablel": "Adirẹsi ti a tọka si" }, - "insufficientBondedAmount": "Lati pe awọn itọka si diẹ sii, di o kere ju {inviteUserFee} XOR" + "insufficientBondedAmount": "Lati pe awọn itọka si diẹ sii, di o kere ju {inviteUserFee} XOR", + "inviteViaTelegram": "Pe nipasẹ {Telegram}", + "welcomeMessage": "\nDarapọ mọ mi lori {Polkaswap}!\n\nṢawari {DEX} ti ara ẹni ti o fun ọ laaye lati paarọ awọn aami aami mejila pẹlu awọn paṣipaarọ ẹwọn agbelebu, iwe aṣẹ, ati ọpọlọpọ awọn ere!\n\n🎁 Pe awọn ọrẹ ki o si jo'gun 10% ti awọn owo iṣowo wọn\n\nRi ọ nibẹ!" }, "transactionDetailsText": "Idunadura Awọn alaye", "code": { diff --git a/src/lang/zh_CN.json b/src/lang/zh_CN.json index a443c0e74..26c0afce2 100644 --- a/src/lang/zh_CN.json +++ b/src/lang/zh_CN.json @@ -938,7 +938,8 @@ "bondMore": "绑定更多", "bond": "绑定", "unbond": "解绑", - "copyLink": "复制链接" + "copyLink": "复制链接", + "shareLink": "分享" }, "transactionDetails": "交易详情", "receivedRewards": "已领取奖励", @@ -970,7 +971,9 @@ "info": "当您支付交易费用时, 10% 将归您的推荐人", "referredLablel": "推荐地址" }, - "insufficientBondedAmount": "要邀请更多推荐者,请至少绑定 {inviteUserFee} XOR" + "insufficientBondedAmount": "要邀请更多推荐者,请至少绑定 {inviteUserFee} XOR", + "inviteViaTelegram": "通过 {Telegram} 邀请", + "welcomeMessage": "\n加入我在 {Polkaswap}!\n\n发现时尚的 {DEX},可以跨链交换数十种代币,订单簿和丰富的奖励!\n\n🎁 邀请朋友并赚取他们交易费用的 10%\n\n到时见!" }, "transactionDetailsText": "交易详情", "code": { diff --git a/src/store/settings/mutations.ts b/src/store/settings/mutations.ts index 78e3ac529..76ec2eaeb 100644 --- a/src/store/settings/mutations.ts +++ b/src/store/settings/mutations.ts @@ -118,6 +118,12 @@ const mutations = defineMutations()({ setAdsArray(state, arr: Array): void { state.adsArray = arr; }, + enableTMA(state): void { + state.isTMA = true; + }, + setTelegramBotUrl(state, url: Nullable): void { + state.telegramBotUrl = url; + }, }); export default mutations; diff --git a/src/store/settings/state.ts b/src/store/settings/state.ts index 460bccaaf..cc35cdc80 100644 --- a/src/store/settings/state.ts +++ b/src/store/settings/state.ts @@ -41,6 +41,8 @@ function initialState(): SettingsState { screenBreakpointClass: BreakpointClass.LargeDesktop, windowWidth: window?.innerWidth ?? 0, adsArray: [], + isTMA: false, + telegramBotUrl: undefined, }; } diff --git a/src/store/settings/types.ts b/src/store/settings/types.ts index aec3e24c6..747f38b2c 100644 --- a/src/store/settings/types.ts +++ b/src/store/settings/types.ts @@ -49,4 +49,6 @@ export type SettingsState = { screenBreakpointClass: BreakpointClass; windowWidth: number; adsArray: Array; + isTMA: boolean; + telegramBotUrl: Nullable; }; diff --git a/src/styles/soramitsu-variables.scss b/src/styles/soramitsu-variables.scss index b3d33c7e3..4743f5b52 100644 --- a/src/styles/soramitsu-variables.scss +++ b/src/styles/soramitsu-variables.scss @@ -50,6 +50,9 @@ $s-shadow-tab: 1px 1px 2px #ffffff, inset 1px 1px 2px rgba(0, 0, 0, 0.1); // 0px $s-shadow-dropdown: 0px 4px 8px rgba(19, 19, 19, 0.15); $s-shadow-mobile-tap-bar: 0px -4px 8px rgba(19, 19, 19, 0.15); $s-shadow-mobile-side-menu: -4px 4px 8px rgba(19, 19, 19, 0.15); +$s-shadow-dialog: -5px -5px 10px var(--s-shadow-color-light), 1px 1px 10px var(--s-shadow-color-dark), inset 1px 1px 2px var(--s-shadow-color-light-dark); +$s-shadow-dialog--dark: -5px -5px 10px var(--s-shadow-color-dark-lighten--dark), 2px 2px 15px var(--s-color-base-background--dark), inset 1px 1px 2px var(--s-shadow-color-dark-lighten--dark); + // Border Radius $s-border-radius-base: 16px; $s-border-radius-mini: $s-border-radius-base; diff --git a/src/utils/index.ts b/src/utils/index.ts index 31019b360..6e5c3fa02 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -10,8 +10,6 @@ import i18n from '@/lang'; import router from '@/router'; import store from '@/store'; -import storage from './storage'; - import type { AmountWithSuffix } from '../types/formats'; import type { Asset, AccountAsset, RegisteredAccountAsset } from '@sora-substrate/util/build/assets/types'; import type { AccountLiquidity } from '@sora-substrate/util/build/poolXyk/types'; diff --git a/src/utils/telegram.ts b/src/utils/telegram.ts new file mode 100644 index 000000000..8a00f87c2 --- /dev/null +++ b/src/utils/telegram.ts @@ -0,0 +1,100 @@ +import { api } from '@soramitsu/soraneo-wallet-web'; +import { + setDebug, + initViewport, + initMiniApp, + initWeb, + isIframe, + retrieveLaunchParams, + initUtils, + type MiniApp, + type LaunchParams, + type Utils, + type Viewport, +} from '@tma.js/sdk'; + +import store from '@/store'; + +export class TmaSdk { + public static miniApp: MiniApp; + public static launchParams: LaunchParams; + public static viewport: Nullable; + private static utils: Utils; + + public static async init(botUrl?: string, isDebug = false): Promise { + try { + // Initialize the app in the web version of Telegram + if (isIframe()) { + initWeb(); + console.info('[TMA]: initTMA: Web version of Telegram'); + } + // Init viewport + await this.initViewport(); + // Init mini app + const [miniApp] = initMiniApp(); + this.miniApp = miniApp; + console.info('[TMA]: Mini app was initialized'); + // Set theme + this.updateTheme(); + // Enable debugging + setDebug(isDebug); + // Retrieve launch params + this.launchParams = retrieveLaunchParams(); + console.info('[TMA]: Launch params were retrieved'); + // Check the referrer + this.setReferrer(this.launchParams.startParam); + // Set the Telegram bot URL + if (botUrl) { + store.commit.settings.setTelegramBotUrl(botUrl); + } + // Init utils + this.utils = initUtils(); + console.info('[TMA]: Utils were initialized'); + } catch (error) { + console.warn('[TMA]: init', error); + } + } + + /** + * **Should be used after `miniApp` init!** + * + * Update the theme of the Telegram Mini App using `var(--s-color-utility-body)` + */ + public static updateTheme(): void { + try { + const colorUtilityBody = + (getComputedStyle(document.documentElement).getPropertyValue('--s-color-utility-body') as `#${string}`) || + '#f7f3f4'; // Default color + + this.miniApp.setHeaderColor(colorUtilityBody); + this.miniApp.setBgColor(colorUtilityBody); + } catch (error) { + console.warn('[TMA]: updateTheme', error); + } + } + + public static shareLink(url: string, text?: string): void { + try { + this.utils.shareURL(url, text ? encodeURIComponent(text) : text); + } catch (error) { + console.warn('[TMA]: shareLink', error); + } + } + + private static async initViewport(): Promise { + try { + const [viewport] = initViewport(); + this.viewport = await viewport; + console.info('[TMA]: Viewport was initialized'); + } catch (error) { + console.warn('[TMA]: initViewport', error); + } + } + + private static setReferrer(referrerAddress?: string): void { + if (referrerAddress && api.validateAddress(referrerAddress)) { + store.commit.referrals.setStorageReferrer(referrerAddress); + console.info('[TMA]: Referrer was set', referrerAddress); + } + } +} diff --git a/src/views/Burn.vue b/src/views/Burn.vue index 5045199ff..3658e33fa 100644 --- a/src/views/Burn.vue +++ b/src/views/Burn.vue @@ -174,7 +174,7 @@ export default class Kensetsu extends Mixins(mixins.LoadingMixin, mixins.Formatt fromTimestamp: 1715791500000, // May 15 2024 16:45:00 GMT+0000 to: 16_056_666, toTimestamp: 1717693074000, // Jun 06 2024 16:57:54 GMT+0000 - disabledText: 'Will be distributed soon', + disabledText: 'Already distributed', }, kensetsu: { id: 'kensetsu', diff --git a/src/views/ReferralProgram.vue b/src/views/ReferralProgram.vue index a1043207b..a232660a1 100644 --- a/src/views/ReferralProgram.vue +++ b/src/views/ReferralProgram.vue @@ -35,10 +35,10 @@ class="s-typography-button--mini" size="small" type="primary" - :tooltip="copyTooltip(t('referralProgram.invitationLink'))" - @click="handleCopyAddress(referralLink.href, $event)" + :tooltip="refLinkTooltip" + @click="handleClickRefLink($event)" > - {{ t('referralProgram.action.copyLink') }} + {{ refLinkText }} @@ -181,6 +181,7 @@ import type { ReferrerRewards } from '@/indexer/queries/referrals'; import router, { lazyView } from '@/router'; import { action, getter, mutation, state } from '@/store/decorators'; import { formatAddress } from '@/utils'; +import { TmaSdk } from '@/utils/telegram'; import type { CodecString } from '@sora-substrate/util'; import type { AccountAsset } from '@sora-substrate/util/build/assets/types'; @@ -213,6 +214,8 @@ export default class ReferralProgram extends Mixins( @state.referrals.invitedUsers invitedUsers!: Array; @state.referrals.referrer referrer!: string; @state.referrals.isReferrerApproved isReferrerApproved!: boolean; + @state.settings.isTMA private isTMA!: boolean; + @state.settings.telegramBotUrl private telegramBotUrl!: Nullable; @getter.assets.xor xor!: Nullable; @getter.wallet.account.account private account!: WALLET_TYPES.PolkadotJsAccount; @@ -386,6 +389,30 @@ export default class ReferralProgram extends Mixins( return this.hasAccountWithBondedXor ? 'secondary' : 'primary'; } + private get hasTMALink(): boolean { + return this.isTMA && !!this.telegramBotUrl; + } + + get refLinkTooltip(): string { + return this.hasTMALink + ? this.t('referralProgram.inviteViaTelegram') + : this.copyTooltip(this.t('referralProgram.invitationLink')); + } + + get refLinkText(): string { + return this.hasTMALink ? this.t('referralProgram.action.shareLink') : this.t('referralProgram.action.copyLink'); + } + + handleClickRefLink(event?: MouseEvent): void { + if (!this.hasTMALink) { + this.handleCopyAddress(this.referralLink.href, event); + return; + } + + const botUrl = `${this.telegramBotUrl}/app?startapp=${this.account.address}`; + TmaSdk.shareLink(botUrl, this.t('referralProgram.welcomeMessage')); + } + destroyed(): void { this.reset(); } @@ -396,7 +423,7 @@ export default class ReferralProgram extends Mixins( }); } - getLinkLabel(address: string): string { + private getLinkLabel(address: string): string { const routerMode = getRouterMode(router); return `Polkaswap.io/${routerMode}referral/${address}`; } diff --git a/src/views/RewardsTabs.vue b/src/views/RewardsTabs.vue index f7c272e3c..491d163ee 100644 --- a/src/views/RewardsTabs.vue +++ b/src/views/RewardsTabs.vue @@ -1,6 +1,6 @@