Merge pull request #2156 from gnosis/release/v3.4.0
Backmerge release v3.4.0
This commit is contained in:
commit
ee03bb6ea7
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "safe-react",
|
"name": "safe-react",
|
||||||
"version": "3.3.1",
|
"version": "3.4.0",
|
||||||
"description": "Allowing crypto users manage funds in a safer way",
|
"description": "Allowing crypto users manage funds in a safer way",
|
||||||
"website": "https://github.com/gnosis/safe-react#readme",
|
"website": "https://github.com/gnosis/safe-react#readme",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { EnvironmentSettings, ETHEREUM_NETWORK, NetworkConfig } from 'src/config
|
||||||
|
|
||||||
const baseConfig: EnvironmentSettings = {
|
const baseConfig: EnvironmentSettings = {
|
||||||
clientGatewayUrl: 'https://safe-client.rinkeby.staging.gnosisdev.com/v1',
|
clientGatewayUrl: 'https://safe-client.rinkeby.staging.gnosisdev.com/v1',
|
||||||
txServiceUrl: 'https://safe-transaction.staging.gnosisdev.com/api/v1',
|
txServiceUrl: 'https://safe-transaction.rinkeby.staging.gnosisdev.com/api/v1',
|
||||||
safeAppsUrl: 'https://safe-apps.dev.gnosisdev.com',
|
safeAppsUrl: 'https://safe-apps.dev.gnosisdev.com',
|
||||||
gasPriceOracle: {
|
gasPriceOracle: {
|
||||||
url: 'https://ethgasstation.info/json/ethgasAPI.json',
|
url: 'https://ethgasstation.info/json/ethgasAPI.json',
|
||||||
|
|
|
@ -36,8 +36,8 @@ const mainnet: NetworkConfig = {
|
||||||
isTestNet: true,
|
isTestNet: true,
|
||||||
nativeCoin: {
|
nativeCoin: {
|
||||||
address: '0x0000000000000000000000000000000000000000',
|
address: '0x0000000000000000000000000000000000000000',
|
||||||
name: 'Energy web token',
|
name: 'Volta Token',
|
||||||
symbol: 'EWT',
|
symbol: 'VT',
|
||||||
decimals: 18,
|
decimals: 18,
|
||||||
logoUri: EwcLogo,
|
logoUri: EwcLogo,
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
import { getSafeClientGatewayBaseUrl, getNetworkInfo } from 'src/config'
|
import { getSafeClientGatewayBaseUrl } from 'src/config'
|
||||||
import { TokenProps } from 'src/logic/tokens/store/model/token'
|
import { TokenProps } from 'src/logic/tokens/store/model/token'
|
||||||
import { checksumAddress } from 'src/utils/checksumAddress'
|
import { checksumAddress } from 'src/utils/checksumAddress'
|
||||||
|
|
||||||
import { ZERO_ADDRESS, sameAddress } from 'src/logic/wallets/ethAddresses'
|
|
||||||
|
|
||||||
export type TokenBalance = {
|
export type TokenBalance = {
|
||||||
tokenInfo: TokenProps
|
tokenInfo: TokenProps
|
||||||
balance: string
|
balance: string
|
||||||
|
@ -35,24 +33,5 @@ export const fetchTokenCurrenciesBalances = async ({
|
||||||
checksumAddress(safeAddress),
|
checksumAddress(safeAddress),
|
||||||
)}/balances/${selectedCurrency}/?trusted=${trustedTokens}&exclude_spam=${excludeSpamTokens}`
|
)}/balances/${selectedCurrency}/?trusted=${trustedTokens}&exclude_spam=${excludeSpamTokens}`
|
||||||
|
|
||||||
return axios.get(url).then(({ data }) => {
|
return axios.get(url).then(({ data }) => data)
|
||||||
// Currently the client-gateway is not returning the balance using network token symbol and name
|
|
||||||
// FIXME remove this logic and return data directly once this is fixed
|
|
||||||
const { nativeCoin } = getNetworkInfo()
|
|
||||||
|
|
||||||
if (data.items && data.items.length) {
|
|
||||||
data.items = data.items.map((element) => {
|
|
||||||
const { tokenInfo } = element
|
|
||||||
if (sameAddress(ZERO_ADDRESS, tokenInfo.address)) {
|
|
||||||
// If it's native coin we swap symbol and name
|
|
||||||
tokenInfo.symbol = nativeCoin.symbol
|
|
||||||
tokenInfo.name = nativeCoin.name
|
|
||||||
}
|
|
||||||
|
|
||||||
return element
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
return data
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,7 @@ type BaseCustom = {
|
||||||
dataSize: string
|
dataSize: string
|
||||||
value: string
|
value: string
|
||||||
isCancellation: boolean
|
isCancellation: boolean
|
||||||
toInfo: AddressInfo
|
toInfo?: AddressInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
type Custom = BaseCustom & {
|
type Custom = BaseCustom & {
|
||||||
|
|
|
@ -17,7 +17,7 @@ const SIGNERS = {
|
||||||
const getSignersByWallet = (isHW) =>
|
const getSignersByWallet = (isHW) =>
|
||||||
isHW ? [SIGNERS.ETH_SIGN] : [SIGNERS.EIP712_V3, SIGNERS.EIP712_V4, SIGNERS.EIP712, SIGNERS.ETH_SIGN]
|
isHW ? [SIGNERS.ETH_SIGN] : [SIGNERS.EIP712_V3, SIGNERS.EIP712_V4, SIGNERS.EIP712, SIGNERS.ETH_SIGN]
|
||||||
|
|
||||||
export const SAFE_VERSION_FOR_OFFCHAIN_SIGNATURES = '>=1.0.0'
|
export const SAFE_VERSION_FOR_OFFCHAIN_SIGNATURES = '>=1.1.1'
|
||||||
|
|
||||||
export const tryOffchainSigning = async (safeTxHash: string, txArgs, isHW: boolean): Promise<string> => {
|
export const tryOffchainSigning = async (safeTxHash: string, txArgs, isHW: boolean): Promise<string> => {
|
||||||
let signature
|
let signature
|
||||||
|
|
|
@ -34,12 +34,6 @@ export const staticAppsList: Array<StaticAppInfo> = [
|
||||||
disabled: false,
|
disabled: false,
|
||||||
networks: [ETHEREUM_NETWORK.MAINNET],
|
networks: [ETHEREUM_NETWORK.MAINNET],
|
||||||
},
|
},
|
||||||
// Aave v2
|
|
||||||
{
|
|
||||||
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmVg7aXr5S8sT2iUdUwdkfTJNknmB7rcE3t92HiGoVsYDj`,
|
|
||||||
disabled: false,
|
|
||||||
networks: [ETHEREUM_NETWORK.MAINNET],
|
|
||||||
},
|
|
||||||
//Balancer Exchange
|
//Balancer Exchange
|
||||||
{
|
{
|
||||||
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmRb2VfPVYBrv6gi2zDywgVgTg3A19ZCRMqwL13Ez5f5AS`,
|
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmRb2VfPVYBrv6gi2zDywgVgTg3A19ZCRMqwL13Ez5f5AS`,
|
||||||
|
|
|
@ -33,7 +33,7 @@ const DetailsWithTxInfo = ({ children, txData, txInfo }: DetailsWithTxInfoProps)
|
||||||
let name
|
let name
|
||||||
let avatarUrl
|
let avatarUrl
|
||||||
|
|
||||||
if (isCustomTxInfo(txInfo)) {
|
if (isCustomTxInfo(txInfo) && txInfo.toInfo) {
|
||||||
name = txInfo.toInfo.name
|
name = txInfo.toInfo.name
|
||||||
avatarUrl = txInfo.toInfo.logoUri
|
avatarUrl = txInfo.toInfo.logoUri
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue