A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import { NETWORK_TO_NAME_MAP } from './enums'
|
|
|
|
|
|
|
|
export const getNetworkDisplayName = (key) => NETWORK_TO_NAME_MAP[key]
|
|
|
|
|
|
|
|
export function formatTxMetaForRpcResult (txMeta) {
|
|
|
|
return {
|
|
|
|
'blockHash': txMeta.txReceipt ? txMeta.txReceipt.blockHash : null,
|
|
|
|
'blockNumber': txMeta.txReceipt ? txMeta.txReceipt.blockNumber : null,
|
|
|
|
'from': txMeta.txParams.from,
|
|
|
|
'gas': txMeta.txParams.gas,
|
|
|
|
'gasPrice': txMeta.txParams.gasPrice,
|
|
|
|
'hash': txMeta.hash,
|
|
|
|
'input': txMeta.txParams.data || '0x',
|
|
|
|
'nonce': txMeta.txParams.nonce,
|
|
|
|
'to': txMeta.txParams.to,
|
|
|
|
'transactionIndex': txMeta.txReceipt ? txMeta.txReceipt.transactionIndex : null,
|
|
|
|
'value': txMeta.txParams.value || '0x0',
|
|
|
|
'v': txMeta.v,
|
|
|
|
'r': txMeta.r,
|
|
|
|
's': txMeta.s,
|
|
|
|
}
|
|
|
|
}
|