Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

adding support for synths, view in wallets, swapping #2546

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .electronbuildrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"appId": "org.thorchain.asgardex",
"productName": "ASGARDEX",
"copyright": "Copyright © 2021 ${author}",
"copyright": "Copyright © 2023 ${author}",
"artifactName": "${productName}-${version}-${os}.${ext}",
"afterSign": "./scripts/notarize.js",
"files": ["resources/icon.png", "src/renderer/assets/svg/coin-*.svg"],
Expand Down
34 changes: 31 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,40 @@
# 1.20.0 (2023-08-1)

## Add

- [Synths Support] [#2545](https://github.com/thorchain/asgardex-electron/issues/2545)
- Affiliate Fee of 30 bps

## Update

- Quotes are now fetched from the Quote Endpoint using the xchainjs query package.
- Upgraded to the latest thorchain and cosmos xchain client packages..
- Added Synths to the asset list.
- Introduced Slip tolerance to quote request for enhanced price protection.
- Enabled [Savers UI] [#2485](https://github.com/thorchain/asgardex-electron/pull/2485) - read-only access.
- Changed 2 to 4 decimal points on the output amount.

## Internal

- Integrated xchain-thorchain-query and its related dependencies to fetch data from the quote endpoint.
- Integrated latest xchain-thornode to utilise the latest THORNode version (v116).
- Adjusted routing to accommodate synths, which is essential for [Savers] [#2431](https://github.com/thorchain/asgardex-electron/issues/2431).
- Updated routing to support synths, utilising `replace('/', '_synth_')`.
- Upgraded and activated Savers Routing for Earn and Withdrawal.
- Adjusted Asgard Midgard to comprehend Synths.
- Replaced Inbound and Outbound fees with references to Inbound_address or the Quote endpoint, and removed the flat 3 * inbound fee.
- Enhanced the Mimir detection logic to identify functionality pauses more effectively.
- Added Affiliate Fee is 30 bps and uses THORName dx

# 1.19.2 (2023-06-30)

# Internal
## Internal

-Updates xchain-thorchain package due to gas issue.

# 1.19.1 (2023-04-XX)
# 1.19.1 (2023-04-11)

# Internal
## Internal

-Updates/refactor to support latest xchain updates for UTXO support. Keystore clients and ledger code updated.

Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ Symbols:
| Ledger \* | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Send \*\* | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Receive | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Upgrade \*\*\* | :heavy_check_mark: | :heavy_check_mark: | - | - | - | :heavy_check_mark: | - | - |
| Upgrade \*\*\* | - | - | - | - | - | :heavy_check_mark: | - | - |
| Deposit | :heavy_check_mark: | - | - | - | - | - | - | - |
| Shares | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| History | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Synths | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Synths | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |

(\*) Ledger `RUNE` is not supported at `stagenet`. Ledger `LTC`/`BCH`/`DOGE` are not supported at `testnet`

(\*\*) With or without memo

(\*\*\*) Upgrade RUNE (BEP2) or RUNE (ERC20) to RUNE (Native)
(\*\*\*) Upgrade RUNE (BEP2) or RUNE (ERC20) to RUNE (Native) - No longer required with Killswitch completed

### Exchange

Expand All @@ -49,7 +49,8 @@ Symbols:
| Deposit \* | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Withdraw \* | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Recovery tool | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Synths | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Synths | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Savers | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |

(\*) Symmetrical deposit/withdraw only

Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "asgardex",
"productName": "ASGARDEX",
"version": "1.19.2-alpha",
"version": "1.20.0",
"description": "WALLET AND EXCHANGE CLIENT FOR THORCHAIN",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -91,16 +91,20 @@
"@xchainjs/xchain-bitcoin": "^0.21.1",
"@xchainjs/xchain-bitcoincash": "^0.15.9",
"@xchainjs/xchain-client": "^0.13.6",
"@xchainjs/xchain-cosmos": "0.20.8",
"@xchainjs/xchain-cosmos": "0.21.2",
"@xchainjs/xchain-crypto": "^0.2.7",
"@xchainjs/xchain-doge": "^0.5.10",
"@xchainjs/xchain-ethereum": "^0.27.7",
"@xchainjs/xchain-litecoin": "^0.11.1",
"@xchainjs/xchain-thorchain": "^0.28.3",
"@xchainjs/xchain-midgard": "0.5.0",
"@xchainjs/xchain-thorchain": "^0.28.5",
"@xchainjs/xchain-thorchain-query": "0.4.6",
"@xchainjs/xchain-thornode": "0.3.4",
"@xchainjs/xchain-util": "^0.12.0",
"@xchainjs/xchain-utxo-providers": "^0.1.1",
"antd": "^4.20.7",
"axios": "^0.25.0",
"axios-retry": "^3.2.5",
"bchaddrjs": "^0.5.2",
"bech32-buffer": "^0.2.0",
"bignumber.js": "^9.0.2",
Expand Down
3 changes: 2 additions & 1 deletion scripts/generateERC20Whitelist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ const createTemplate = (list: AssetList): string => {
*/

import * as O from 'fp-ts/lib/Option'
import { Asset, ETHChain } from '@xchainjs/xchain-util'
import {Asset} from "@xchainjs/xchain-util";
import {ETHChain} from "@xchainjs/xchain-ethereum";

export const ERC20_WHITELIST: { asset: Asset, iconUrl: O.Option<string> }[] = [${listAsString}]
`
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/components/AssetsFilter/AssetsFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export const AssetsFilter: React.FC<Props> = ({ poolFilters, className, activeFi
__base__: intl.formatMessage({ id: 'common.asset.base' }),
__usd__: 'usd',
__erc20__: 'erc20',
__bep2__: 'bep2'
__bep2__: 'bep2',
__synth__: 'synth'
}),
[intl]
)
Expand Down
18 changes: 9 additions & 9 deletions src/renderer/components/pool/PoolTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Action as ActionButtonAction, ActionButton } from '../../components/uie
import { DEFAULT_WALLET_TYPE } from '../../const'
import { loadingString } from '../../helpers/stringHelper'
import * as poolsRoutes from '../../routes/pools'
// import * as saversRoutes from '../../routes/pools/savers'
import * as saversRoutes from '../../routes/pools/savers'
import { AssetIcon } from '../uielements/assets/assetIcon'
import * as Styled from './PoolTitle.styles'

Expand Down Expand Up @@ -95,15 +95,15 @@ export const PoolTitle: React.FC<Props> = ({
})
)
}
}
},
// TODO(@veado) Enable savers
// {
// label: intl.formatMessage({ id: 'common.savers' }),
// disabled: !isAvailablePool || disableAllPoolActions || disableTradingPoolAction,
// callback: () => {
// navigate(saversRoutes.earn.path({ asset: assetToString(asset), walletType: DEFAULT_WALLET_TYPE }))
// }
// }
{
label: intl.formatMessage({ id: 'common.savers' }),
disabled: !isAvailablePool,
callback: () => {
navigate(saversRoutes.earn.path({ asset: assetToString(asset), walletType: DEFAULT_WALLET_TYPE }))
}
}
]

return <ActionButton size={isDesktopView ? 'large' : 'normal'} actions={actions} />
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/savers/AddSavers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { useIntl } from 'react-intl'
import { Network } from '../../../shared/api/types'
import { max1e8BaseAmount } from '../../helpers/assetHelper'
import { loadingString, noDataString } from '../../helpers/stringHelper'
//import { WalletBalance } from '../../services/wallet/types'
import { BaseAmountRD } from '../../types'
import { AssetWithAmount, AssetWithDecimal } from '../../types/asgardex'
import { PricePool } from '../../views/pools/Pools.types'
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/swap/SelectableSlipTolerance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ChangeSlipToleranceHandler } from '../../services/app/types'
import { SlipTolerance } from '../../types/asgardex'
import { BaseButton } from '../uielements/button'

export const SLIP_PERCENTAGES: SlipTolerance[] = [0.5, 1, 3, 5, 10]
export const SLIP_PERCENTAGES: SlipTolerance[] = [0.5, 1, 3, 5, 10, 15, 20]
export const SLIP_TOLERANCE_KEY = 'asgdx-slip-tolerance'

export type Props = {
Expand Down
Loading
Loading