Merge branch 'development' into feature/add-aave-app

This commit is contained in:
Daniel Sanchez 2021-04-12 17:08:59 +02:00
commit a9b67c0ab5
8 changed files with 11 additions and 32 deletions

View File

@ -1,6 +1,6 @@
{
"name": "safe-react",
"version": "3.3.1",
"version": "3.4.0",
"description": "Allowing crypto users manage funds in a safer way",
"website": "https://github.com/gnosis/safe-react#readme",
"bugs": {

View File

@ -3,7 +3,7 @@ import { EnvironmentSettings, ETHEREUM_NETWORK, NetworkConfig } from 'src/config
const baseConfig: EnvironmentSettings = {
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',
gasPriceOracle: {
url: 'https://ethgasstation.info/json/ethgasAPI.json',

View File

@ -36,8 +36,8 @@ const mainnet: NetworkConfig = {
isTestNet: true,
nativeCoin: {
address: '0x0000000000000000000000000000000000000000',
name: 'Energy web token',
symbol: 'EWT',
name: 'Volta Token',
symbol: 'VT',
decimals: 18,
logoUri: EwcLogo,
},

View File

@ -1,11 +1,9 @@
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 { checksumAddress } from 'src/utils/checksumAddress'
import { ZERO_ADDRESS, sameAddress } from 'src/logic/wallets/ethAddresses'
export type TokenBalance = {
tokenInfo: TokenProps
balance: string
@ -35,24 +33,5 @@ export const fetchTokenCurrenciesBalances = async ({
checksumAddress(safeAddress),
)}/balances/${selectedCurrency}/?trusted=${trustedTokens}&exclude_spam=${excludeSpamTokens}`
return axios.get(url).then(({ 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
})
return axios.get(url).then(({ data }) => data)
}

View File

@ -28,10 +28,10 @@ export const useLoadSafe = (safeAddress?: string, loadedViaUrl = true): boolean
}
}
}
dispatch(loadAddressBookFromStorage())
dispatch(loadAddressBookFromStorage())
fetchData()
}, [dispatch, safeAddress])
}, [dispatch, safeAddress, loadedViaUrl])
return isSafeLoaded
}

View File

@ -133,7 +133,7 @@ type BaseCustom = {
dataSize: string
value: string
isCancellation: boolean
toInfo: AddressInfo
toInfo?: AddressInfo
}
type Custom = BaseCustom & {

View File

@ -17,7 +17,7 @@ const SIGNERS = {
const getSignersByWallet = (isHW) =>
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> => {
let signature

View File

@ -33,7 +33,7 @@ const DetailsWithTxInfo = ({ children, txData, txInfo }: DetailsWithTxInfoProps)
let name
let avatarUrl
if (isCustomTxInfo(txInfo)) {
if (isCustomTxInfo(txInfo) && txInfo.toInfo) {
name = txInfo.toInfo.name
avatarUrl = txInfo.toInfo.logoUri
}