Skip to content

Commit

Permalink
Release 1.7 fixes (#623)
Browse files Browse the repository at this point in the history
* use connection timeout only for custom nodes (#316)

* PW-166: WEB UI: Screens Consistency and Responsive Design Updates (#319)

* Pool Screen: Fixed collapse arrows.
* Pool List: Made whole button area clickable.
* Fixed Terms and Privacy Policy responsive behaviour.
* Transaction Settings Dialog: Added content area.

* Add SORAScan links (#321)

* remove some overrides (#320)

* remove some overrides

* collapse css

* update select node css

* fix collable background

* add min-height for bridge-content

* change subscribe liquidity flow (#324)

* change subscribe liquidity flow

* fix calls order

* move padding to non scoped css (#325)

* Keep sora hash for user guide (#323)

* Keep sora hash for user guide

* Fix issues & improve styles

* Remove unused assets

* Use registered assets in bridge modal (sora -> evm) (#326)

* update select token modals

* fix return type

* fix rewards button loading icon (#327)

* load fonts from overides to render icons not transparent (#328)

* load fonts from overides to reneder icons not transparent

* add TODO

* Fix select token css (#331)

* fix overflow issue

* fix transaction copy button

* fix bridge card padding

* Add token address to bridge inputs (#332)

* add TokenAddress component

* fix font-weight

* Fix bridge registeredAssets initial fetching (#335)

* don't fetch registered assets twice

* fix select network flow

* fix double request liquidityProxy after switch tokens (#336)

* Fix typo & improve sorascan links (#334)

* Fix typo
* Update sorascan links
* Update wallet

* PW-179: Font Feature Settings Removing (#329)

* Removed font feature settings.
* Removed Lottie Loader.
* Font feature settings overriding.
* Updated font feature settings.

* Improve node connection process after disconnect (#337)

* improve node connection process after disconnect

* fix css

* fix typo

* remove lottie loader from rewards (#338)

* fix reset bridge form (#339)

* create independent subscriptions (#340)

* Create pool subscriptions at first (#341)

* create subscription at first, to not allow leak because async hook

* improve createAccountLiquiditySubscription

* refactoring add liquiddity return

* Update api version (#344)

* Update subscriptions flow, refactoring (#342)

* refactoring some components

* update subscriptions management

* add some css fixes (#346)

* Fix rewards loader (#345)

* PW-184: Bridge. Transaction shows as failed, but actually is not (#343)

* Transaction fix draft.

* Fixed transaction movement.

Co-authored-by: alexnatalia <[email protected]>
Co-authored-by: Stefan Popov <[email protected]>

* Improve update history flow (#349)

* fix token-address color

* update wallet to 1.3.35

* fix nodeIsConnected getter

* Updated history list styles. (#351)

* Remove moment.js (#353)

* applt changes

* change registration order

* change icon font path

* Fix jest config (#354)

* Updated wallet version. (#355)

* Updated wallet version. (#356)

* use components from library directly (#358)

* update wallet (#359)

* update wallet

* remove temporary string

* Icon font updates (#357)

* Add files via upload

* updated more icons

* fixed farm icon placement

* Add tokens view (#350)

* add tokens view with simple render whitelist

* Update soramitsuUI.ts

* update according to design

* css fixes

Co-authored-by: Stefan Popov <[email protected]>

* tokens list ui updates (#361)

* PW-53: Migration to ether (#312)

* feat: migration to ethers.js

* chore: update yarn.lock

* chore: remove logs

* feat: improve speed up

* chore: remove console.log

* chore: remove rebase issues

* feat: added minor code improvments

Co-authored-by: Stefan Popov <[email protected]>

* Updated wallet version and translation. (#363)

* PW-207: Design Improvements (#360)

* Updated Disclaimer.
* Refactored Disclaimer styles.
* Updated radio elements styles.
* Updated inputs border radiuses.
* Updated Screens Header, Node Control Styles.
* Updated menu styles, refactored.
* Updated tabs and action bage styles.
* Updated Pool styles.
* Updated buttons styles.
* Refactored variables names.
* Updated wallet version.

* Updated wallet version, updated translation for connection screen. (#366)

* update axios baseUrl (#365)

* [DOPS-1380] Add Push to IPFS stage for tags (#364)

* Add a Push to IPFS stage

Signed-off-by: Dmitriy Creed <[email protected]>

* Add a Push to IPFS stage

Signed-off-by: Dmitriy Creed <[email protected]>

* Add a Push to IPFS stage

Signed-off-by: Dmitriy Creed <[email protected]>

* Add a Push to IPFS stage

Signed-off-by: Dmitriy Creed <[email protected]>

* Apply changes from code review

Signed-off-by: Dmitriy Creed <[email protected]>

* Apply changes from code review

Signed-off-by: Dmitriy Creed <[email protected]>

* Token list: css fix & add sort by symbol (#362)

* css fix & add sort by symbol

* add sorting, filter

* revert env

* remove unnecessary v-if

* sort ui changes

Co-authored-by: Stefan Popov <[email protected]>

* Detailed rewards screen (#367)

* update rewards ui

* fix ts errors

* improve messages

* add formatted amount component

* improve formatted-amount

* design update

* simple group rendering (external rewards)

* update rewards table styles

* fix checkbox css

* css fixes

* types fix

Co-authored-by: Stefan Popov <[email protected]>

* PW-190: Remove unused abi (#352)

* Reduce files size

* Update Jenkinsfile (#368)

Signed-off-by: Dmitriy Creed <[email protected]>

* Fix 1.3 release issues (#370)

* Delete Master.json (#371)

* Delete Bridge.json (#372)

* Tech/remove web3 (#373)

* remove web3

* add web3-utils

* add TODO

* define Abi related interfaces & types

* add check in index.html (#375)

* fix for ipfs path (#376)

* add cache-control header (#377)

* update wallet to 1.3.47 (#379)

* update wallet to 1.3.47

* up package version to 1.4.0

* PW-207: Design Improvements Updates (#374)

* Moved Tokens menu item above About item.
* Updated header buttons.
* Updated dialog and collapse items.
* Removed button icon.
* Hide swap button in the wallet.
* Updated search fields and assets logo in Select asset dialogs.
* Fixed Slippage tolerance styles.
* Updated buttons, icons styles.
* Updated wallet version.
* Fixed header buttons styles.

* remove toggle-text-button (#381)

* fix amount table css (#382)

* tooltip bg color fix (#384)

* Update Liquidity screens (#385)

* wip share of pool

* update addLiquidity screen

* update CreatePair screen

* add slippage tolerance to create pair

* update remove liquidity screen

* remove console.log

* show message to change account, save to field in history (#388)

* Fix ethers signature creating (#391)

* fix ethers signature creating

* remove console.log

* Update metamask error handler flow (#393)

* update metamask error handle flow

* fix message

* Language switch (#387)

* Draft

* Update App.vue

* Add lang switch & russian language

* Improve set locale for numbers

* refactoring

* fix async

* split chunks

* add lang files

* add some fixes

* css fixes

* prefetch optimization

* disable source maps in production

* add fallback locale

* add chack to action

* update document title

* update language files

* fix paths & some ru translations

Co-authored-by: Nikita-Polyakov <[email protected]>

* fix sign with ethers (#394)

* Sync with release 1.3 (#398)

* Reduce abi files size

* PW-243: Fix async method

* PW-253: Fix swap styles

* Update translations (#402)

* use another number to detect separators (#405)

* fix parsing network using ethers (#401)

* Force connection close after disconnect event (#404)

* manually close connection after disconnect event

* fix calls order

* Change rewards vested text (#403)

* change rewards vested text

* update translations

* PW-230: Fiat Layouts (#386)

* Added fiat values functionality.
* Refactored fiat values.
* Refactored due to PR comments, updated wallet version.
* Refactored, increased wallet version.
* Added Bridge Fiat values, Refactored.
* Refactored due to PR comments.
* Added fiat styles mixin.
* Added Fiat value check.
* Increased wallet version.
* Refactored plugins names.
* Refactored due to PR comments, updated translation.
* Refactored Fiat functionality.
* Refactored.
* Refactored layouts, updated alignment for balances areas.
* Fixed input container address alignment.
* Added Rewards Fiat Values, fixed some classes.
* Improved Fiat Functionality for Select Token components.
* Showed Swap button in the wallet.
* Fixed fiat values for Rewards.
* Increased Wallet version.
* Updated UI Lib paths.
* Fixed DesignSystem path.
* Hide Swap button in the wallet.
* Updated Rewards styles.
* Update dependencies
* Fix confirm tokens pair dialog
* Fix issues in add liquidity & create pair components
* Fix pool issues
* Update TokenPairMixin.ts
* Updated Rewards styles.
* Fixed layout problems.
* Refactored Rewards.
* Updated Bridge Transaction Fiat values.
* Update BridgeTransaction.vue
* Update soramitsuUI.ts
* fix rewards fiat size & weight

* Updated Bridge Design. (#400)

* Add SOSHIBA token (#409)

* Translation updates (#411)

* Updated translation.
* Localisation fixes.

* Add dark theme first part (#412)

* Add dark theme first part

* Update wallet

* Rewards & node selection dialog dark mode (#413)

* update select node modal

* update rewards view

* fix fee border color

* fix divider background

* fix icon size

Co-authored-by: Stefan Popov <[email protected]>

* Added numbers formatting to the header. (#414)

* Update polkaswap_icons.ttf (#396)

Co-authored-by: Stefan Popov <[email protected]>

* PW-248: Swap, Select Token & Pools dark mode (#415)

* Dark Theme: Updated Swap, Pool, Select Token theme.
* Updated Pool list layout.
* Updated Wallet version.

* Add icon to theme switch (#416)

* Add scrollbar to main views (#408)

* draft

* Update deps

* fix scrollbars rendering win

* simplify, fix css

* remove unused style

* fix

* Fix styles

Co-authored-by: Nikita-Polyakov <[email protected]>
Co-authored-by: Nikita Polyakov <[email protected]>

* Updated wallet version. (#418)

* PW-246: Bridge Dark Mode (#417)

* Refactored Bridge styles due to Dark theme.

* Updated network icons styles.

* Updated Bridge Transaction styles.

* Bridge: Added connection info for EVM to Sora transaction.

* Bridge Select Asset: Updated layout and styles.

* Updated wallet version.

* Refactored due to PR comments.

* Fix bridge issues

Co-authored-by: alexnatalia <[email protected]>
Co-authored-by: Stefan Popov <[email protected]>

* Fix select registered tokens dialog issue (#420)

* About, Main menu, Header & Tokens dark mode (#419)

* update header menu footer

* prepare about page for dark images

* app merge fix

* add loader to about page

* tokens: fix no data text color

* add about page dark mode images

* refactoring about page

* fix text-transform

* fix tokens table th align

* add max-width to account-control

* Update About.vue

* Update Tokens.vue

Co-authored-by: Stefan Popov <[email protected]>
Co-authored-by: Tarmo Vannas <[email protected]>

* PW-258: Problem with changing MetaMask network. (#407)

* fix after network switch

* return console error

Co-authored-by: Stefan Popov <[email protected]>

* Edit custom node (#317)

* add pencil button

* fix back button position

* edit node name

* updating flow

* revert generic page header

* fix typo

* fix calls order

* update wallet

* add scrollbar to node list

* add scrollbar to select language

* update translations

Co-authored-by: Stefan Popov <[email protected]>

* Fiat Value Layouts bug (#421)

* Fixed Fiat Value Layouts bug.
* Bridge Select Token: Fixed fiat value presence.
* Updated wallet version.
* Updated due to PR comments.
* Fixed Bridge history list bug.

* Fix evm name (#422)

* Add price impact (#380)

* add price impact calc

* price difference calculation

* colored price impact & fiat difference

* fix status color for dark mode

* update package.json version to 1.5.0

* fix ipv4 regexp (#425)

* Fix dialog scrollbars (#424)

* fix dialog scrollbars

* remove dialog fixed top offset

* move dialog scrollbar position to right

* remove override

* remove outdated overrides

* PW-156 PW-291: Fix bridge issues (#426)

* Update project version

* Add error message

* Fix types

* Fix bridge issue with error statuses

* Add condition to bridge tx page according to previous route

* PW-291: Fix bridge buttons behavior

* Refactor bridge tx component

* Fix back button behavior

* fix ui issues (#428)

* add prefer notification arg to handle error method (#430)

* Vested rewards visibility (#431)

* show vested rewards with 0 limit

* fix tooltip bg

* update wallet

* fix light theme button shadow (#433)

* Update translations (#436)

* Update translations

* Update whitelist.json

* Fix loading icon for select node dialog (#434)

* refactoring bridge unused & duplicated code (#427)

* refactoring bridge unused & duplicated code

* Update BridgeTransaction.vue

Co-authored-by: Stefan Popov <[email protected]>

* PW-15: Image Lazy Loading (#429)

* Added Lazy Images draft.
* Moved About page images to public folder.
* Added lazy images behaviour for About page.
* Refactored images object.
* Updated wallet version, changed styles for skeletons.
* Update About.vue
* About page: reverted license translation.

* Tooltip Styles Fix (#432)

* Removed buggy styles for tooltips.
* Updated wallet version, cosmetic fix.
* Updated translation for Wallet Send screen.

* Updated wallet version. (#438)

* Fix lokalise strings (#440) (#441)

* Fix lokalise strings

* Update pl.json

* Fix disclamer tittle

* Update ru.json

* Rewards: fix fiat values (#442) (#443)

* fix fiat values

* fix ts error

* remove import

* Fix lang switch (#445)

* PW-286: Update Account History Screen (#439)

* Refactored InfoLine component, moved it into the wallet.
* Removed TODO.
* Updated wallet version.

* add scrollbar to SelectToken & SelectRegisteredAsset (#446)

* Update whitelist (#448) (#449)

* PW-289: Update logic for getting account liquidity in Polkaswap (#444)

* Updated liquidity pools subscription and fee calls.

* Update wallet

* Updated pool screens subscriptions.

* Updated pool subscriptions and network fees.

* Fix liquidity updates

* Reverted evmNetworkFee changes.

* Add some fixes to pool pages (#450)

* add some fixes

* remove unused watch

Co-authored-by: Stefan Popov <[email protected]>

Co-authored-by: alexnatalia <[email protected]>
Co-authored-by: Stefan Popov <[email protected]>
Co-authored-by: Nikita Polyakov <[email protected]>

* fix calc evm network fee (#447)

* PW-319: Search by Custom tokens is not worked (#452)

* Updated translations.
* Fixed translation issues.

* Fix share of pool calculation (Add, Remove Liquidity) (#453)

* fix share of pool calc

* up package.json version to 1.6.0

* Feature/pw 326 (#455)

* swap reserves change check pair

* add PoolContainer with subscriptions

* update subscription after disconnect

* update subscription after sync

* fix typo

* add comment

* Added StaFi tokens: rFIS, rETH, rDOT, rATOM, rKSM. (#456)

* PW-329: Add delay to tooltips and fix connected info text (#454)

* Updated account and node tooltips.
* Updated tooltip for connected node.
* Fixed missed translation pair.
* Updated wallet version, fixed Send button styles.
* Refactored icons styles.
* Refactored icons styles for the wallet.

* Fix dev stand issues (#458)

* Update package.json (#459)

* Update package.json

* Update yarn.lock

* Update whitelist.json (#460)

* Add new wallet version (#463)

* Update project for new wallet version

* Add apy to pools

* Update wallet version

* Update Pool.vue

* soraNetwork refactoring

Co-authored-by: Nikita-Polyakov <[email protected]>

* Add apy for pools (#464)

* change regexp to pass top level domain (#462)

* Rewards: add css fixes & change rewards header layout (#461)

* add css fixes & change rewards header layout

* fix type errors

* fix calc fiat total price

* fix type

* fix attr

* refactoring FPNumber.Zero

* Fix/bridge fee and refactor code (#465)

* Fix tx sync

* Fix sora network fee

* soraNetworkFee getter

* use networkFees from wallet

Co-authored-by: Nikita-Polyakov <[email protected]>

* Apy for add liquidity (#467)

* Add apy for add liquidity screen & confirm dialog

* Update implementation according to new reqs

* Update lang

* Update AmountHeader.vue

* PW-356: Update supported languages list (#468)

* Updated languages list and translations.
* Updated translations.
* Updated DE, FR laguages due to PR comments.
* Updated HY laguage due to PR comments.

* Rewards: Fixed fiat value error. (#469)

* Wallet improvements (#470)

* Update wallet integration

* Add missing types

* Update locales & env config files

* Update languages

* Update BridgeTransaction.vue

* Fix wallet issue (#474)

* Change spinner loader (#473)

* Change spinner loader

* Edit indentation

Co-authored-by: Stefan Popov <[email protected]>

* BridgeTransaction: Show token approval prompt (#466)

* show approve text

* update translations

* Remove liquidity: reactive updates (#476)

* remove pool reactive liquidity

* fix update after liquidity adding

* typings in remove liquidity component & store

* update ConfirmRemoveLiquidity types

* update type

* import only Asset type

* Add scroll to custom assets (#481)

* Add prettier config & update dependencies (vue cli and others) (#482)

* Update dependencies

* Update source code according to prettier config

* Fix lint issues

* use axiosInstance from sora-substrate/util

* Update vue.config.js

* Update NodeInfo.vue

Co-authored-by: Nikita-Polyakov <[email protected]>

* Improve locale check (#480)

* recursive check for locale

* fix filename

* Change links to sora wiki (#477)

* Change links to sora wiki

* Update localise

* polkaswap layout updates (#479)

* polkaswap layout updates

* update social.wiki translate

* sidebar menu alignment

* remove hardcoded width from dialogs

* lint fix

* add menu animation

* css fixes

* fix disclaimer

* update wallet

* add css fixes

* add el-dialog-max-width variable

* improve regexp (#483)

* Add liquidity pool route (#484)

* Add liquidity pool route

* Add typings

* Delete unused component

* Change class naming

* Hide balances functionality (#485)

* Create AppHeader.vue

* Update header component

* Fix select registered assets dialog height

* Update yarn.lock

* Update library

* Add hide balances mode

* Add dropdown menu for app header

* Update translations

* Update wallet version

* Update AmountHeader.vue

* Add SEO (#487)

* Add SEO

* Update messages.ts

Co-authored-by: Stefan Popov <[email protected]>

* Feature/pw 197 (#437)

* wip moonpay dialog

* add moonpay logo

* get transaction id throught moonpay.html

* add MoonpayApi class

* polling functionality

* fix iframe reload

* wip detect currency

* parse erc-20 token transfer

* registered asset check

* add todo comments

* init bridge transaction

* fix network issue, add loading widget state

* improve debug info, theme language widget update

* change view to notification

* reset dialog state

* wip moonpay history

* moonpay history styles

* add moonpay history details view

* init bridge from moonpay history & show transaction

* fix bridge init from history

* handle error from moonpay history

* moonpay api init refactoring

* check auth for moonpay history page

* improve history button to start bridge

* confirmation modal

* moonpay history checks for eth account

* add some error notifications

* add links to translations

* update translations

* rework header buttons

* fix active color for tx button

* revert 73eeb10

* rework confirm modal

* add translation

* hardcode api key

* align moonpay header buttons

* update translations

* Revert "hardcode api key"

This reverts commit 04fdf4f.

* update view transaction button

* refactoring

* remove unnecessary imports

* fix type

* improve moonay buttons alignment

* add feature flags to env.json

* remove unused code from app.vue

* update prod env.json

* update moonpay history button & types

* refactoring confirm-bridge-transaction-dialog

* refactoring evmNetworkFee

* wip bridge data flow

* update flow & modals

* refactoring select node dialog

* fix bugs, add types

* add AccountButton component

* fix loader position

* add AppLogoButton & AppMenu components

* fix z-index

* fixes after review

* remove unnecessary call

* css fixes after review

* refactoring

Co-authored-by: Stefan Popov <[email protected]>

* Fix/wallet translations (#486)

* first update

* update Transfer Operation translations

* Add xstusd token & fix for swap (#488)

* Update whitelist.json

* Add temporary solution for swap xst-usd

* Change SEO image (#489)

* Fix hide balances icon (#491)

* Update wallet version (#492)

* Define account type (#493)

* Define account type

* Update AppHeader.vue

* PW-412: Swap: Min Received value is NaN in browser logs (#490)

* Swap: Fixed min received init value.
* Refactored due to PR comments.

* add segment to ip regexp (#496)

* fix calc error (#497)

* update wallet version (#499)

* fix getEvmNetworkFee (#501)

* fix getEvmNetworkFee

* fix typo

* beautify code

* Add hide balances feature for Moonpay history (#502)

* fix bridge date (#500)

Co-authored-by: Nikita-Polyakov <[email protected]>
Co-authored-by: Nikita Polyakov <[email protected]>

* Revert "fix bridge date (#500)" (#506)

This reverts commit 5e896ea.

* change font weight (#504)

* change font weight

* Upgrade wallet

Co-authored-by: Stefan Popov <[email protected]>

* Add network check before navigation to moonpay history item (#503)

* add network check before navigation to history item

* fix loading history state

Co-authored-by: Stefan Popov <[email protected]>

* update typescript to 4.4.4 (#505)

* update typescript to 4.4.4

* update typescript-eslint

* update @types/node

* update eslint-plugins

* update vue-router wallet-connect

* update sass-loader

* use TransactioMixin from wallet

* refactoring for VoidFunction

* pw-433 remove fiat value from lp fee

* Add block number (#507)

* Add block number

* Fix block number link

* Change link tooltip

* History. Amounts rounding at claimed rewards event isn't work (#509)

* update wallet version to 1.6.24

* rfactoring

* remove LoadingMixin from about page

* Add templates (#510)

* update wallet (#511)

* Improve Polkaswap routing (#512)

* add info popper

* update translations from localise

* add translations

* refactoring

* add popper min-width

* style & translation fixes

* Add Market maker countdown. (#508)

* Add Countdown component

* add popover

* move node selection to dropdown

* update translations

* update wallet

* fixed version of wallet in package.json

* remove unused code

* replace XOR symbol

* remove popper arrow

* add countdown box-shadow var

* refactoring

* replace MM & info tooltips for popover

* change backend version text in info

* Fix XST icon (#513)

* Fix XST icon

* Update whitelist.json

* Disable not supported tokens for bridge (#494)

* Update About.vue (#515)

* Setup unit tests (#514)

Co-authored-by: Stefan Popov <[email protected]>

* Implement liquidityProxy.quote on front-end side (#498)

* wip transfer code

* wip xst

* tbc quote

* wip quote

* finish quote

* wip calc fixes

* fix xyk

* wip xst fixes

* fix smart split

* fix calc mismatches

* fix tbc calc error

* add QuotePayload type

* wip refactoring

* update wallet

* refactoring swap

* refactoring swap component

* add try catch to quotes

* remove unused variable

* update wallet & refactoring

* update wallet & code

* add some types

Co-authored-by: Stefan Popov <[email protected]>

* add K postfix (#516)

* Feature/pw 200/add notification warning (#518)

* Update wallet

* Implement dialog popup logic

* Add translations

* Change imports & version

* TokenLogo: Added unit test. (#519)

* Updated PR template. (#522)

Co-authored-by: alexnatalia <[email protected]>

* PW-481: Add SwapInfo unit test (#517)

* SwapInfo: Added unit test.

* Change subscription place (#521)

* Change subscription place

* Remove unused action

* add account button unit-test (#523)

* add account button unit-test

* Update SwapInfo.spec.ts.snap

* Update dates formatting (#527)

* change dayjs locale

* change dayjs locale

* remove months from localise

* Swap rpc requests optimization (#528)

* rpc requests optimization

* remove rpc calls for paths

* Update wallet version

Co-authored-by: Stefan Popov <[email protected]>

* Hot fix frozen assets (#531)

* Hot fix frozen assets

* change version

* MM Countdown: fix percentage & text (#532)

* fix percentage & text

* fix ru btn translation

* Fix rewards store (#535)

* [1.6.0] Fix swap issues (#534)

* update subscription

* move unsubscriptions to beforeDestroy

* css fixs

* Return back account menu item (#536)

* Fix "swap" button (#538)

* fix swap button

* remove external link icon

* fix isInsufficientLiquidity

* Update lokalise files (#537)

* Update lokalise files

* Refactor code

* Fix styles

* Revert "Fix styles"

This reverts commit 1ed1ae6.

* Update api version

* Fix disclaimer

* Fix all translations with nested variables

* Update pl.json

* Update cs.json

* Fix translations

* Update nl.json

* Fix translations

* Fix disclaimer

* Fix translations

* Update de.json

* Fix

* Update pl.json

* Update ru.json

* Update api (#539)

* [Rewards] Fix checkmark position (#542)

* fix checkmark position

* change checkmark

* fix rewards tooltip

* return condition

* Increased wallet version to 1.6.38 (#543)

Co-authored-by: alexnatalia <[email protected]>

* Fix styles (#541)

* Update AppHeader.vue

* Add new translations

* Fix xorless notifications

* Update AppHeader (#544)

* Update AppHeader.vue

* Update AddLiquidity.vue

* Update wallet version

* fix for liquidity sources without market algorithm (#546)

* Add moonpay key (#547)

* Fix block number (#548)

* Fix block number

* Update locale files

* Add block number translation key

* Add noir token (#551)

* Compress noir token icon (#553)

* increase interval, remove unnecessary error log (#554)

* Remove SORA nodes (#555)

* Feature/pw 488/hide transaction details (#529)

* Add tx details dropdown

* Add create pair details

* Refactor components

* Fix empty assets

* Collapse margins

* Add translations & refactor

* Replace KnownAssets.get with XOR

* Fix life-cycle

* Fix mixins for liquidity & token pair creation

* add infoOnly prop to TransactionDetails component (#557)

Co-authored-by: Stefan Popov <[email protected]>
Co-authored-by: Nikita Polyakov <[email protected]>

* Fix ETH decimals (#562)

* Fix external decimals for bridge (#563) (#566)

* api migration (#569)

* draft

* Update api version

* Fix swap info (#570)

* use extended ubuntu 14 dockerImage

Signed-off-by: Ahmed Elkashef <[email protected]>

* Add desktop config (#572)

* Add electron config

* Update dependencies

* Fix build

* Update README.md

* Comment tests

* Add API key (#571)

* Add API key

* Trigger root dispatch

* Remove setApiKey

* move key

* Add translations

* mock nft in tests

* Update settings.ts

* Feature/pw 542 (#576)

* always show LP rewards

* update wallet to 1.7.6

* refactoring rewards calls

* revert if condition

* update rewards ru translation

* improve condition for watcher (#577)

* Updating Dockerfile

Signed-off-by: Nikita Zaporozhets <[email protected]>

* Bridge refactoring (#565)

* refactoring evm fee fetching

* remove unused store attributes

* remove duplicated code

* add isRegisteredAsset getter to bridge

* evm netfork fee update

* fix endTime bug, remove unnecessary code

* remove transactionStep from state

* refactoring computed attributes in BridgeTransaction

* refactoring BridgeTransaction flags

* transfered BridgeOutgoing logic

* add TODO comments & reduce github changes

* remove redundant code

* remove empty mutations

* transfer EthBridgeIncoming logic & remove xstate

* refactoring bridge utils

* refactoring bridge getters

* wip debugging

* wip refactoring bridge store

* refactoring bridge handlers

* wip refactoring bridge utils

* update ethereumNetworkFee during evm tx processing

* refactoring common state handlers

* fix retry

* fix issues aaprove & remove history by id

* refactoring to classes

* refactoring bridge, fix bugs

* remove unused code

* stop tx, show action needed

* update translations

* fix history align

* fix account assets subscription watcher

* change font-size:10px to variable

* refactoring after review

* PW-519: About Page Images Update (#586)

* About Page: Updated images and styles.

* Update Dockerfile

Signed-off-by: Nikita Zaporozhets <[email protected]>

* up wallet version (#588)

* PW-404: Referral system support (#533)

* Added Referral System.
* Referral System: Updated Rewards areas, bonded balance, styles and icons.

* Bridge subscriptions (#585)

* refactoring evm fee fetching

* remove unused store attributes

* remove duplicated code

* add isRegisteredAsset getter to bridge

* evm netfork fee update

* fix endTime bug, remove unnecessary code

* remove transactionStep from state

* refactoring computed attributes in BridgeTransaction

* refactoring BridgeTransaction flags

* transfered BridgeOutgoing logic

* add TODO comments & reduce github changes

* remove redundant code

* remove empty mutations

* transfer EthBridgeIncoming logic & remove xstate

* refactoring bridge utils

* refactoring bridge getters

* wip debugging

* wip refactoring bridge store

* refactoring bridge handlers

* wip refactoring bridge utils

* update ethereumNetworkFee during evm tx processing

* refactoring common state handlers

* fix retry

* fix issues aaprove & remove history by id

* refactoring to classes

* refactoring bridge, fix bugs

* remove unused code

* stop tx, show action needed

* update translations

* fix history align

* fix account assets subscription watcher

* change font-size:10px to variable

* change timeout to subscriptions

* refactoring

* set confirmation to 1, write evm block number in tx

* add blocks left

* update subscriptions

* small fixes

* show current tx network fees if they not exists

* fix network type bug

* update translations

* update to import type BridgeHistory

* get sora hash for incoming transfer

* add comment

* fix subscription promise (#590)

* fix all-liquidity updatePrice params (#591)

* assets subscription integration (#592)

* PW-555: Referral System Issues (#593)

* Referral system: Fixed unbond Max Button, Active Menu state, Added Redirect after Bond/Unbond, Updated Referrals Addresses.
* Referral System: Added message if user already has referrer.
* Fixed Set Referral Confirmation Dialog.
* Updated icon classes.

* update wallet to 1.7.16 (#597)

* Fix nft issues according to new api (#596)

* Fix nft issues according to new api

* fix remove account asset

Co-authored-by: Nikita-Polyakov <[email protected]>

* Restrict operations for non divisible assets (#598)

* Restrict operations for non divisible assets

* Update wallet version

* Update Navigation Bar (#594)

* show dropdown or buttons in app header menu

* fix initial render

* add type for menu item

* transafer styles

Co-authored-by: Stefan Popov <[email protected]>

* PW-561: Referral System Rewards Issues (#599)

* Updated wallet version.
* Referral Rewards: Fixed Referrals Rewards Values.

* Fix about page (#600)

* Bridge history restoration: improve current flow (#589)

* refactoring evm fee fetching

* remove unused store attributes

* remove duplicated code

* add isRegisteredAsset getter to bridge

* evm netfork fee update

* fix endTime bug, remove unnecessary code

* remove transactionStep from state

* refactoring computed attributes in BridgeTransaction

* refactoring BridgeTransaction flags

* transfered BridgeOutgoing logic

* add TODO comments & reduce github changes

* remove redundant code

* remove empty mutations

* transfer EthBridgeIncoming logic & remove xstate

* refactoring bridge utils

* refactoring bridge getters

* wip debugging

* wip refactoring bridge store

* refactoring bridge handlers

* wip refactoring bridge utils

* update ethereumNetworkFee during evm tx processing

* refactoring common state handlers

* fix retry

* fix issues aaprove & remove history by id

* refactoring to classes

* refactoring bridge, fix bugs

* remove unused code

* stop tx, show action needed

* update translations

* fix history align

* fix account assets subscription watcher

* change font-size:10px to variable

* change timeout to subscriptions

* refactoring

* set confirmation to 1, write evm block number in tx

* add blocks left

* update subscriptions

* small fixes

* show current tx network fees if they not exists

* fix network type bug

* update translations

* update to import type BridgeHistory

* get sora hash for incoming transfer

* wip history restoration

* restore history with more accurate data

* set timestamps to restored history

* incoming transactions restoration

* fix cancelled evm tx flow

* fix checkmark position

* fix parsing amount

* etherscan implementation

* speed up restoration

* improve filtering

* create BridgeContainer

* add ethescan api key to env.json

* change restoration executon from parallel to continious

* refactoring web3 & bridge mixin

* restore bridge history in desc order

* fix build error

* update ethescan API keys

Co-authored-by: Stefan Popov <[email protected]>

* update wallet to 1.7.19 (#601)

* PW-560: Referral System Translation Issues (#595)

* Referral System: Updated Localisation.
* PW-564: Fixed Bonded Balance Translation.

* Use subquery in bridge history (#602)

* refactoring evm fee fetching

* remove unused store attributes

* remove duplicated code

* add isRegisteredAsset getter to bridge

* evm netfork fee update

* fix endTime bug, remove unnecessary code

* remove transactionStep from state

* refactoring computed attributes in BridgeTransaction

* refactoring BridgeTransaction flags

* transfered BridgeOutgoing logic

* add TODO comments & reduce github changes

* remove redundant code

* remove empty mutations

* transfer EthBridgeIncoming logic & remove xstate

* refactoring bridge utils

* refactoring bridge getters

* wip debugging

* wip refactoring bridge store

* refactoring bridge handlers

* wip refactoring bridge utils

* update ethereumNetworkFee during evm tx processing

* refactoring common state handlers

* fix retry

* fix issues aaprove & remove history by id

* refactoring to classes

* refactoring bridge, fix bugs

* remove unused code

* stop tx, show action needed

* update translations

* fix history align

* fix account assets subscription watcher

* change font-size:10px to variable

* change timeout to subscriptions

* refactoring

* set confirmation to 1, write evm block number in tx

* add blocks left

* update subscriptions

* small fixes

* show current tx network fees if they not exists

* fix network type bug

* update translations

* update to import type BridgeHistory

* get sora hash for incoming transfer

* wip history restoration

* restore history with more accurate data

* set timestamps to restored history

* incoming transactions restoration

* fix cancelled evm tx flow

* fix checkmark position

* fix parsing amount

* etherscan implementation

* speed up restoration

* improve filtering

* create BridgeContainer

* add ethescan api key to env.json

* change restoration executon from parallel to continious

* refactoring web3 & bridge mixin

* restore bridge history in desc order

* fix build error

* update ethescan API keys

* rework history restoration using subquery

* fix for & tiny optimization

* fetch block number based on transactions

* fix duplicated fetch

* optimization of logs search

* remove restored flag

* add bridgeHistorySyncTimestamp

* move history restoration to class

* refactoring

Co-authored-by: Stefan Popov <[email protected]>

* nft adjustments (#604)

* update wallet

* update translations

* Add api key

* Update wallet version

* Update token icons

Co-authored-by: Stefan Popov <[email protected]>

* update wallet to 1.7.23 (#606)

* update wallet 1.7.24 (#608)

* Fix header menu issues (#610)

* handle case when eth completed later than restoration (#611)

* Referral System: Invited Users Subscription (#612)

* Referral System: Added Invited Users Subscription.

* Fix UI issues (#613)

* Update ConfirmBonding.vue

* Fix types

* Fix scroll for dialog wrappers

* update wallet

* Fix click outside

Co-authored-by: Nikita-Polyakov <[email protected]>

* Fix referral system issue (#614)

* Fix referral system issue

* Update yarn.lock

* Fix is bond state (#616)

* up wallet version to 1.7.28 in package.json (#617)

* up wallet version to 1.7.28 in package.json

* update yarn.lock

* Fix fiat values, update bridge history request (#603)

* replace PaginationSearchMixin

* improve bridge history fetching

* update wallet to 1.7.29

* Fix dialogs & fix select token dialog for custom assets (#620)

* Fix node dialog

* Fix other dialogs

* Improve performance

* Update SelectToken.vue

* Referral Rewards Fix (#621)

* Fixed Referral Rewards.

* Remove deprecated code (#622)

* Delete PaginationSearchMixin.ts

Co-authored-by: Nikita Polyakov <[email protected]>
Co-authored-by: Alex Natalia <[email protected]>
Co-authored-by: alexnatalia <[email protected]>
Co-authored-by: Tarmo Vannas <[email protected]>
Co-authored-by: Robert Sayakhov <[email protected]>
Co-authored-by: Dmitriy Creed <[email protected]>
Co-authored-by: Nikita-Polyakov <[email protected]>
Co-authored-by: RustemYuzlibaev <[email protected]>
Co-authored-by: Ahmed Elkashef <[email protected]>
Co-authored-by: Nikita Zaporozhets <[email protected]>
Co-authored-by: Nikita Zaporozhets <[email protected]>
  • Loading branch information
12 people authored Mar 11, 2022
1 parent 5450215 commit 9ec4e32
Show file tree
Hide file tree
Showing 26 changed files with 144 additions and 210 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"dependencies": {
"@metamask/detect-provider": "^1.2.0",
"@soramitsu/soraneo-wallet-web": "^1.7.27",
"@soramitsu/soraneo-wallet-web": "^1.7.30",
"@walletconnect/web3-provider": "^1.6.6",
"core-js": "^3.6.4",
"ethers": "^5.5.4",
Expand Down
1 change: 0 additions & 1 deletion src/components/ConfirmBridgeTransactionDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ import { lazyComponent } from '@/router';
@Component({
components: {
DialogBase,
InfoLine: components.InfoLine,
BridgeTransactionDetails: lazyComponent(Components.BridgeTransactionDetails),
},
})
Expand Down
1 change: 0 additions & 1 deletion src/components/ConfirmRemoveLiquidity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const namespace = 'removeLiquidity';
DialogBase,
TokenLogo: lazyComponent(Components.TokenLogo),
RemoveLiquidityTransactionDetails: lazyComponent(Components.RemoveLiquidityTransactionDetails),
InfoLine: components.InfoLine,
},
})
export default class ConfirmRemoveLiquidity extends Mixins(
Expand Down
1 change: 0 additions & 1 deletion src/components/ConfirmSwap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const namespace = 'swap';
@Component({
components: {
DialogBase,
SwapInfo: lazyComponent(Components.SwapInfo),
TokenLogo: lazyComponent(Components.TokenLogo),
SwapTransactionDetails: lazyComponent(Components.SwapTransactionDetails),
},
Expand Down
2 changes: 2 additions & 0 deletions src/components/DialogBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ export default class DialogBase extends Mixins(DialogMixin) {
* It's required cuz we've added scrollbar between dialog layers and default click outside directive doesn't work
*/
private handleClickOutside(event: Event, el: Node): void {
// IMPORTANT: If something was used with v-if and this node was removed -> dialog will be closed by default.
// Need to stop event propagation in this case
if (!(el === event.target || el.contains(event.target as Node)) && this.isVisible) {
this.closeDialog();
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/GenericPageHeader.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div :class="headerClasses">
<s-button v-if="hasButtonBack" type="action" icon="arrows-chevron-left-rounded-24" @click="handleBack" />
<s-button v-if="hasButtonBack" type="action" icon="arrows-chevron-left-rounded-24" @click="handleBack($event)" />
<h3 class="page-header-title">
<slot name="title">
{{ title }}
Expand Down Expand Up @@ -43,8 +43,8 @@ export default class GenericPageHeader extends Mixins(TranslationMixin) {
return classes.join(' ');
}
handleBack(): void {
this.$emit('back');
handleBack(event?: Event): void {
this.$emit('back', event);
}
}
</script>
Expand Down
7 changes: 5 additions & 2 deletions src/components/Referrals/ConfirmBonding.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import type { AccountAsset } from '@sora-substrate/util/build/assets/types';
import DialogMixin from '@/components/mixins/DialogMixin';
import DialogBase from '@/components/DialogBase.vue';
import { lazyComponent } from '@/router';
import { Components } from '@/consts';
import { Components, PageNames } from '@/consts';
const namespace = 'referrals';
Expand All @@ -57,9 +57,12 @@ export default class ConfirmBonding extends Mixins(mixins.TransactionMixin, mixi
@State((state) => state[namespace].xorValue) xorValue!: string;
@Getter networkFees!: NetworkFeesObject;
@Getter('isBond', { namespace }) isBond!: boolean;
@Getter('tokenXOR', { namespace: 'assets' }) tokenXOR!: AccountAsset;
get isBond(): boolean {
return this.$route.name === PageNames.ReferralBonding;
}
get formattedXorValue(): string {
return this.formatStringValue(this.xorValue, this.tokenXOR?.decimals);
}
Expand Down
11 changes: 1 addition & 10 deletions src/components/SelectLanguageDialog.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<template>
<dialog-base
:visible.sync="visibility"
:before-close="beforeClose"
:title="t('selectLanguageDialog.title')"
class="select-language-dialog"
>
<dialog-base :visible.sync="visibility" :title="t('selectLanguageDialog.title')" class="select-language-dialog">
<s-scrollbar class="select-language-scrollbar">
<s-radio-group v-model="selectedLang" class="select-language-list s-flex">
<s-radio
Expand Down Expand Up @@ -66,10 +61,6 @@ export default class SelectLanguageDialog extends Mixins(TranslationMixin) {
set selectedLang(value: Language) {
this.setLanguage(value);
}
beforeClose(closeFn: VoidFunction): void {
closeFn();
}
}
</script>

Expand Down
11 changes: 4 additions & 7 deletions src/components/SelectNodeDialog.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<template>
<dialog-base
:visible.sync="visibility"
:before-close="beforeClose"
:title="t('selectNodeDialog.title')"
:class="['select-node-dialog', dialogCustomClass]"
>
Expand Down Expand Up @@ -74,6 +73,9 @@ export default class SelectNodeDialog extends Mixins(NodeErrorMixin, mixins.Load
set visibility(flag: boolean) {
this.setSelectNodeDialogVisibility(flag);
if (!flag) {
this.handleBack();
}
}
get connectedNodeAddress(): string {
Expand Down Expand Up @@ -136,16 +138,11 @@ export default class SelectNodeDialog extends Mixins(NodeErrorMixin, mixins.Load
}
}
navigateToNodeInfo(node: NodeItem | undefined): void {
navigateToNodeInfo(node?: NodeItem): void {
this.selectedNode = node || {};
this.changeView(NodeInfoView);
}
beforeClose(closeFn: VoidFunction): void {
closeFn();
this.handleBack();
}
handleBack(): void {
this.changeView(NodeListView);
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/SelectRegisteredAsset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
size="big"
@focus="handleSearchFocus"
>
<template #suffix v-if="query">
<s-button type="link" class="s-button--clear" icon="clear-X-16" @click="handleClearSearch" />
<template #suffix>
<s-button v-show="query" type="link" class="s-button--clear" icon="clear-X-16" @click="handleClearSearch" />
</template>
</s-input>
</s-form-item>
Expand Down
26 changes: 17 additions & 9 deletions src/components/SelectToken.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@
prefix="s-icon-search-16"
size="big"
>
<template #suffix v-if="query">
<s-button type="link" class="s-button--clear" icon="clear-X-16" @click="handleClearSearch" />
<template #suffix>
<s-button
v-show="query"
type="link"
class="s-button--clear"
icon="clear-X-16"
@click="handleClearSearch"
/>
</template>
</s-input>
</div>
Expand Down Expand Up @@ -72,16 +78,18 @@
size="big"
@input="debouncedCustomAssetSearch"
>
<template #suffix v-if="customAddress">
<s-button type="link" class="s-button--clear" icon="clear-X-16" @click="resetCustomAssetFields" />
<template #suffix>
<s-button
v-show="customAddress"
type="link"
class="s-button--clear"
icon="clear-X-16"
@click="resetCustomAssetFields"
/>
</template>
</s-input>
</div>
<s-scrollbar
v-if="sortedNonWhitelistAccountAssets.length"
:key="'filtered' + sortedNonWhitelistAccountAssets.length"
class="token-list-scrollbar"
>
<s-scrollbar class="token-list-scrollbar">
<div class="asset-select__info" v-if="alreadyAttached">{{ t('selectToken.custom.alreadyAttached') }}</div>
<div class="asset-select__info" v-else-if="!customAsset && customAddress">
{{ t('selectToken.custom.notFound') }}
Expand Down
9 changes: 8 additions & 1 deletion src/components/Settings/Node/NodeInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class="node-info s-flex"
@submit.native.prevent="submitForm"
>
<generic-page-header has-button-back :title="title" @back="handleBack">
<generic-page-header has-button-back :title="title" @back="handleClickBack($event)">
<template v-if="existing && removable">
<s-button type="action" icon="basic-trash-24" @click="removeNode(nodeModel)" />
</template>
Expand Down Expand Up @@ -143,6 +143,13 @@ export default class NodeInfo extends Mixins(TranslationMixin) {
return this.nodeModel.name !== this.node.name || this.nodeModel.address !== this.node.address;
}
handleClickBack(event?: Event): void {
if (event) {
event.stopImmediatePropagation();
}
this.handleBack();
}
async submitForm(): Promise<void> {
try {
await (this.$refs.nodeForm as any).validate();
Expand Down
13 changes: 10 additions & 3 deletions src/components/Settings/Node/SelectNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
type="action"
alternative
icon="arrows-chevron-right-rounded-24"
@click="handleNode(node)"
@click="handleClick($event, node)"
/>
</div>
</s-radio>
</s-radio-group>
</s-scrollbar>
<s-button class="select-node-button s-typography-button--large" @click="handleNode()">
<s-button class="select-node-button s-typography-button--large" @click="handleClick($event)">
{{ t('selectNodeDialog.addNode') }}
</s-button>
</div>
Expand All @@ -53,12 +53,19 @@ import TranslationMixin from '@/components/mixins/TranslationMixin';
@Component
export default class SelectNode extends Mixins(TranslationMixin) {
@Prop({ default: () => [], type: Array }) nodes!: Array<NodeItem>;
@Prop({ default: () => {}, type: Function }) handleNode!: (node: NodeItem) => void;
@Prop({ default: () => {}, type: Function }) handleNode!: (node?: NodeItem) => void;
@Prop({ default: '', type: String }) environment!: string;
@Prop({ default: false, type: Boolean }) disableSelect!: boolean;
@ModelSync('value', 'input', { type: String })
readonly currentAddressValue!: string;
handleClick(event?: Event, node?: NodeItem) {
if (event) {
event.stopImmediatePropagation();
}
this.handleNode(node);
}
}
</script>

Expand Down
33 changes: 0 additions & 33 deletions src/components/mixins/PaginationSearchMixin.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/consts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ export enum Components {
MarketMakerCountdown = 'App/Header/MarketMakerCountdown/MarketMakerCountdown',
AppMenu = 'App/Menu/AppMenu',
AppInfoPopper = 'App/Menu/AppInfoPopper',
SwapInfo = 'SwapInfo',
SelectToken = 'SelectToken',
TokenLogo = 'TokenLogo',
PairTokenLogo = 'PairTokenLogo',
Expand Down
13 changes: 0 additions & 13 deletions src/store/referrals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import storage from '@/utils/storage';
const types = flow(
flatMap((x) => [x + '_REQUEST', x + '_SUCCESS', x + '_FAILURE']),
concat([
'SET_BOND',
'SET_XOR_VALUE',
'SET_REFERRAL',
'SET_INVITED_USERS_INFO',
Expand All @@ -28,7 +27,6 @@ interface ReferralsState {
referral: string;
invitedUsers: Nullable<Array<string>>;
invitedUsersUpdates: Nullable<Subscription>;
isBond: boolean;
xorValue: string;
storageReferral: string;
}
Expand All @@ -38,7 +36,6 @@ function initialState(): ReferralsState {
referral: '',
invitedUsers: null,
invitedUsersUpdates: null,
isBond: true,
xorValue: '',
storageReferral: storage.get('storageReferral') || '',
};
Expand All @@ -53,9 +50,6 @@ const getters = {
invitedUsers(state: ReferralsState) {
return state.invitedUsers;
},
isBond(state: ReferralsState) {
return state.isBond;
},
storageReferral(state: ReferralsState) {
return state.storageReferral;
},
Expand Down Expand Up @@ -93,10 +87,6 @@ const mutations = {
});
},

[types.SET_BOND](state: ReferralsState, isBond: boolean) {
state.isBond = isBond;
},

[types.SET_XOR_VALUE](state: ReferralsState, xorValue: string) {
state.xorValue = xorValue;
},
Expand Down Expand Up @@ -135,9 +125,6 @@ const actions = {
resetInvitedUsersSubscription({ commit }) {
commit(types.RESET_INVITED_USERS_SUBSCRIPTION);
},
setBound({ commit }, isBound: boolean) {
commit(types.SET_BOND, isBound);
},
setXorValue({ commit }, xorValue: string) {
commit(types.SET_XOR_VALUE, xorValue);
},
Expand Down
19 changes: 16 additions & 3 deletions src/utils/bridge/history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,22 @@ export class EthBridgeHistory {
public async fetchHistoryElements(address: string, timestamp = 0): Promise<HistoryElement[]> {
const operations = [Operation.EthBridgeOutgoing, Operation.EthBridgeIncoming];
const filter = historyElementsFilter({ address, operations, timestamp });
const variables = { filter };
const { edges } = await SubqueryExplorerService.getAccountTransactions(variables);
const history = edges.map((edge) => edge.node);
const history: HistoryElement[] = [];

let hasNext = true;
let after = '';

do {
const variables = { after, filter, first: 100 };
const {
edges,
pageInfo: { hasNextPage, endCursor },
} = await SubqueryExplorerService.getAccountTransactions(variables);
const elements = edges.map((edge) => edge.node) as HistoryElement[];
hasNext = hasNextPage;
after = endCursor;
history.push(...elements);
} while (hasNext);

return history as HistoryElement[];
}
Expand Down
Loading

0 comments on commit 9ec4e32

Please sign in to comment.