update tx service history endpoint

This commit is contained in:
mmv 2019-06-20 15:04:52 +04:00
parent 5a2e33f967
commit 57ddfad2b0
7 changed files with 10 additions and 10 deletions

View File

@ -7,7 +7,7 @@ import {
} from '~/config/names'
const devConfig = {
[TX_SERVICE_HOST]: 'https://safe-transaction-history.dev.gnosisdev.com/api/v1/',
[TX_SERVICE_HOST]: 'https://safe-transaction-service.dev.gnosisdev.com/api/v1/',
[ENABLED_TX_SERVICE_REMOVAL_SENDER]: false,
[SIGNATURES_VIA_METAMASK]: false,
[RELAY_API_URL]: 'https://safe-relay.staging.gnosisdev.com/api/v1/',

View File

@ -7,7 +7,7 @@ import {
} from '~/config/names'
const prodConfig = {
[TX_SERVICE_HOST]: 'https://safe-transaction-history.dev.gnosisdev.com/api/v1/',
[TX_SERVICE_HOST]: 'https://safe-transaction-service.dev.gnosisdev.com/api/v1/',
[ENABLED_TX_SERVICE_REMOVAL_SENDER]: false,
[SIGNATURES_VIA_METAMASK]: false,
[RELAY_API_URL]: 'https://safe-relay.staging.gnosisdev.com/api/v1/',

View File

@ -66,7 +66,7 @@ export const createTransaction = async (safeAddress: string, to: string, valueIn
const web3 = getWeb3()
const from = web3.currentProvider.selectedAddress
const threshold = await safeInstance.getThreshold()
const nonce = await safeInstance.nonce()
const nonce = (await safeInstance.nonce()).toString()
const valueInWei = web3.utils.toWei(valueInEth, 'ether')
const isExecution = threshold.toNumber() === 1

View File

@ -16,7 +16,7 @@ const calculateBodyFrom = async (
nonce: string | number,
transactionHash: string,
sender: string,
type: TxServiceType,
confirmationType: TxServiceType,
) => {
const contractTransactionHash = await safeInstance.getTransactionHash(
to,
@ -38,14 +38,14 @@ const calculateBodyFrom = async (
operation,
nonce,
safeTxGas: 0,
dataGas: 0,
baseGas: 0,
gasPrice: 0,
gasToken: ZERO_ADDRESS,
refundReceiver: ZERO_ADDRESS,
contractTransactionHash,
transactionHash,
sender: getWeb3().utils.toChecksumAddress(sender),
type,
confirmationType,
}
}

View File

@ -38,7 +38,7 @@ export const setOwners = async (safeAddress: string, owners: List<Owner>) => {
export const getOwners = async (safeAddress: string): Map<string, string> => {
const data: Object = await loadFromStorage(`${OWNERS_KEY}-${safeAddress}`)
console.log(data)
return data ? Map(data) : Map()
}

View File

@ -19,7 +19,7 @@ const createTransaction = (
const safeInstance = await getGnosisSafeInstanceAt(safeAddress)
const from = userAccountSelector(state)
const threshold = await safeInstance.getThreshold()
const nonce = await safeInstance.nonce()
const nonce = (await safeInstance.nonce()).toString()
const isExecution = threshold.toNumber() === 1
let txHash

View File

@ -15,7 +15,7 @@ import { addTransactions } from './addTransactions'
type ConfirmationServiceModel = {
owner: string,
submissionDate: Date,
type: string,
confirmationType: string,
transactionHash: string,
}
@ -40,7 +40,7 @@ const buildTransactionFrom = async (safeAddress: string, tx: TxServiceModel, saf
return makeConfirmation({
owner: makeOwner({ address: conf.owner, name: ownerName }),
type: ((conf.type.toLowerCase(): any): TxServiceType),
type: ((conf.confirmationType.toLowerCase(): any): TxServiceType),
hash: conf.transactionHash,
})
}),