Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: release v1.653.0 #7485

Merged
merged 13 commits into from
Aug 6, 2024
Merged
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 .env.base
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ REACT_APP_FEATURE_ARBITRUM_BRIDGE=false
REACT_APP_FEATURE_CUSTOM_TOKEN_IMPORT=true
REACT_APP_FEATURE_ARBITRUM_BRIDGE_CLAIMS=false
REACT_APP_FEATURE_USDT_APPROVAL_RESET=true
REACT_APP_FEATURE_PORTALS_SWAPPER=false
REACT_APP_FEATURE_PORTALS_SWAPPER=true
REACT_APP_FEATURE_RUNEPOOL=false

# absolute URL prefix
Expand Down
1 change: 0 additions & 1 deletion .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
REACT_APP_FEATURE_ARBITRUM_BRIDGE=true
REACT_APP_FEATURE_ARBITRUM_BRIDGE_CLAIMS=true
REACT_APP_FEATURE_RUNEPOOL=true
REACT_APP_FEATURE_PORTALS_SWAPPER=true

# logging
REACT_APP_REDUX_WINDOW=false
Expand Down
1 change: 0 additions & 1 deletion .env.develop
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
REACT_APP_FEATURE_CHATWOOT=true
REACT_APP_FEATURE_ARBITRUM_BRIDGE=true
REACT_APP_FEATURE_RUNEPOOL=true
REACT_APP_FEATURE_PORTALS_SWAPPER=true

# mixpanel
REACT_APP_MIXPANEL_TOKEN=1c1369f6ea23a6404bac41b42817cc4b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,14 @@ export const assertAndProcessMemo = (memo: string): string => {
case 'pool+': {
return memo
}
case 'pool-': {
// RUNEPOOL:BASISPOINTS
const [_action, basisPoints] = memo.split(':')

assertIsValidBasisPoints(basisPoints, memo)

return `${_action}:${basisPoints}:${THORCHAIN_AFFILIATE_NAME}:0`
}
default:
throw new Error(`unsupported memo: ${memo}`)
}
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export type Asset = {
explorerTxLink: string
explorerAddressLink: string
relatedAssetKey: AssetId | null | undefined
isPool?: boolean
}

export type AssetsById = Record<AssetId, Asset>
Expand Down
4 changes: 3 additions & 1 deletion packages/types/src/market.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { AssetId } from '@shapeshiftoss/caip'

export type MarketData = {
price: string
marketCap: string
Expand Down Expand Up @@ -39,5 +41,5 @@ export type FindAllMarketArgs = {
}

export type MarketCapResult = {
[k: string]: MarketData
[k: AssetId]: MarketData
}
13 changes: 11 additions & 2 deletions scripts/generateAssetData/arbitrum/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { arbitrumChainId } from '@shapeshiftoss/caip'
import type { Asset } from '@shapeshiftoss/types'
import partition from 'lodash/partition'
import uniqBy from 'lodash/uniqBy'

import { arbitrum } from '../baseAssets'
Expand All @@ -11,12 +12,20 @@ export const getAssets = async (): Promise<Asset[]> => {
coingecko.getAssets(arbitrumChainId),
getPortalTokens(arbitrum),
])
const [assets, portalsAssets] = results.map(result => {
const [assets, _portalsAssets] = results.map(result => {
if (result.status === 'fulfilled') return result.value
console.error(result.reason)
return []
})
const allAssets = uniqBy(assets.concat(portalsAssets).concat([arbitrum]), 'assetId')

// Order matters here - We do a uniqBy and only keep the first of each asset using assetId as a criteria
// portals pools *have* to be first since Coingecko may also contain the same asset, but won't be able to get the `isPool` info
// Regular Portals assets however, should be last, as Coingecko is generally more reliable in terms of e.g names and images
const [portalsPools, portalsAssets] = partition(_portalsAssets, 'isPool')
const allAssets = uniqBy(
portalsPools.concat(assets).concat(portalsAssets).concat([arbitrum]),
'assetId',
)

return allAssets
}
13 changes: 11 additions & 2 deletions scripts/generateAssetData/avalanche/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { avalancheChainId } from '@shapeshiftoss/caip'
import type { Asset } from '@shapeshiftoss/types'
import partition from 'lodash/partition'
import uniqBy from 'lodash/uniqBy'

import { avax } from '../baseAssets'
Expand All @@ -12,13 +13,21 @@ export const getAssets = async (): Promise<Asset[]> => {
getPortalTokens(avax),
])

const [assets, portalsAssets] = results.map(result => {
const [assets, _portalsAssets] = results.map(result => {
if (result.status === 'fulfilled') return result.value
console.error(result.reason)
return []
})

const allAssets = uniqBy(assets.concat(portalsAssets).concat([avax]), 'assetId')
// Order matters here - We do a uniqBy and only keep the first of each asset using assetId as a criteria
// portals pools *have* to be first since Coingecko may also contain the same asset, but won't be able to get the `isPool` info
// Regular Portals assets however, should be last, as Coingecko is generally more reliable in terms of e.g names and images
const [portalsPools, portalsAssets] = partition(_portalsAssets, 'isPool')

const allAssets = uniqBy(
portalsPools.concat(assets).concat(portalsAssets).concat([avax]),
'assetId',
)

return allAssets
}
13 changes: 11 additions & 2 deletions scripts/generateAssetData/base/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { baseChainId } from '@shapeshiftoss/caip'
import type { Asset } from '@shapeshiftoss/types'
import partition from 'lodash/partition'
import uniqBy from 'lodash/uniqBy'

import { base } from '../baseAssets'
Expand All @@ -12,13 +13,21 @@ export const getAssets = async (): Promise<Asset[]> => {
getPortalTokens(base),
])

const [assets, portalsAssets] = results.map(result => {
const [assets, _portalsAssets] = results.map(result => {
if (result.status === 'fulfilled') return result.value
console.error(result.reason)
return []
})

const allAssets = uniqBy(assets.concat(portalsAssets).concat([base]), 'assetId')
// Order matters here - We do a uniqBy and only keep the first of each asset using assetId as a criteria
// portals pools *have* to be first since Coingecko may also contain the same asset, but won't be able to get the `isPool` info
// Regular Portals assets however, should be last, as Coingecko is generally more reliable in terms of e.g names and images
const [portalsPools, portalsAssets] = partition(_portalsAssets, 'isPool')

const allAssets = uniqBy(
portalsPools.concat(assets).concat(portalsAssets).concat([base]),
'assetId',
)

return allAssets
}
13 changes: 11 additions & 2 deletions scripts/generateAssetData/bnbsmartchain/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { bscChainId } from '@shapeshiftoss/caip'
import type { Asset } from '@shapeshiftoss/types'
import { partition } from 'lodash'
import uniqBy from 'lodash/uniqBy'

import { bnbsmartchain } from '../baseAssets'
Expand All @@ -12,13 +13,21 @@ export const getAssets = async (): Promise<Asset[]> => {
getPortalTokens(bnbsmartchain),
])

const [assets, portalsAssets] = results.map(result => {
const [assets, _portalsAssets] = results.map(result => {
if (result.status === 'fulfilled') return result.value
console.error(result.reason)
return []
})

const allAssets = uniqBy(assets.concat(portalsAssets).concat([bnbsmartchain]), 'assetId')
// Order matters here - We do a uniqBy and only keep the first of each asset using assetId as a criteria
// portals pools *have* to be first since Coingecko may also contain the same asset, but won't be able to get the `isPool` info
// Regular Portals assets however, should be last, as Coingecko is generally more reliable in terms of e.g names and images
const [portalsPools, portalsAssets] = partition(_portalsAssets, 'isPool')

const allAssets = uniqBy(
portalsPools.concat(assets).concat(portalsAssets).concat([bnbsmartchain]),
'assetId',
)

return allAssets
}
Loading
Loading