2021-04-28 21:53:59 +02:00
|
|
|
import { TRANSACTION_STATUSES } from '../../shared/constants/transaction';
|
2020-11-07 08:38:12 +01:00
|
|
|
|
2020-05-19 01:48:11 +02:00
|
|
|
const state = {
|
2020-11-03 00:41:28 +01:00
|
|
|
metamask: {
|
|
|
|
isInitialized: true,
|
|
|
|
isUnlocked: true,
|
|
|
|
featureFlags: { sendHexData: true },
|
|
|
|
identities: {
|
2018-05-05 17:11:53 +02:00
|
|
|
'0xfdea65c8e26263f6d9a1b5de9555d2931a33b825': {
|
2020-11-03 00:41:28 +01:00
|
|
|
address: '0xfdea65c8e26263f6d9a1b5de9555d2931a33b825',
|
|
|
|
name: 'Send Account 1',
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
|
|
|
'0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb': {
|
2020-11-03 00:41:28 +01:00
|
|
|
address: '0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb',
|
|
|
|
name: 'Send Account 2',
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
|
|
|
'0x2f8d4a878cfa04a6e60d46362f5644deab66572d': {
|
2020-11-03 00:41:28 +01:00
|
|
|
address: '0x2f8d4a878cfa04a6e60d46362f5644deab66572d',
|
|
|
|
name: 'Send Account 3',
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
|
|
|
'0xd85a4b6a394794842887b8284293d69163007bbb': {
|
2020-11-03 00:41:28 +01:00
|
|
|
address: '0xd85a4b6a394794842887b8284293d69163007bbb',
|
|
|
|
name: 'Send Account 4',
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
cachedBalances: {},
|
|
|
|
currentBlockGasLimit: '0x4c1878',
|
|
|
|
currentCurrency: 'USD',
|
|
|
|
conversionRate: 1200.88200327,
|
|
|
|
conversionDate: 1489013762,
|
|
|
|
nativeCurrency: 'ETH',
|
|
|
|
frequentRpcList: [],
|
|
|
|
network: '3',
|
|
|
|
provider: {
|
|
|
|
type: 'testnet',
|
|
|
|
chainId: '0x3',
|
2020-10-13 01:35:55 +02:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
accounts: {
|
2018-05-05 17:11:53 +02:00
|
|
|
'0xfdea65c8e26263f6d9a1b5de9555d2931a33b825': {
|
2020-11-03 00:41:28 +01:00
|
|
|
code: '0x',
|
|
|
|
balance: '0x47c9d71831c76efe',
|
|
|
|
nonce: '0x1b',
|
|
|
|
address: '0xfdea65c8e26263f6d9a1b5de9555d2931a33b825',
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
|
|
|
'0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb': {
|
2020-11-03 00:41:28 +01:00
|
|
|
code: '0x',
|
|
|
|
balance: '0x37452b1315889f80',
|
|
|
|
nonce: '0xa',
|
|
|
|
address: '0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb',
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
|
|
|
'0x2f8d4a878cfa04a6e60d46362f5644deab66572d': {
|
2020-11-03 00:41:28 +01:00
|
|
|
code: '0x',
|
|
|
|
balance: '0x30c9d71831c76efe',
|
|
|
|
nonce: '0x1c',
|
|
|
|
address: '0x2f8d4a878cfa04a6e60d46362f5644deab66572d',
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
|
|
|
'0xd85a4b6a394794842887b8284293d69163007bbb': {
|
2020-11-03 00:41:28 +01:00
|
|
|
code: '0x',
|
|
|
|
balance: '0x0',
|
|
|
|
nonce: '0x0',
|
|
|
|
address: '0xd85a4b6a394794842887b8284293d69163007bbb',
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
addressBook: {
|
2020-10-13 01:35:55 +02:00
|
|
|
'0x3': {
|
2019-09-21 19:36:06 +02:00
|
|
|
'0x06195827297c7a80a443b6894d3bdb8824b43896': {
|
2020-11-03 00:41:28 +01:00
|
|
|
address: '0x06195827297c7a80a443b6894d3bdb8824b43896',
|
|
|
|
name: 'Address Book Account 1',
|
|
|
|
chainId: '0x3',
|
2019-09-21 19:36:06 +02:00
|
|
|
},
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
2019-09-21 19:36:06 +02:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
tokens: [
|
2018-05-05 17:11:53 +02:00
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
address: '0x1a195821297c7a80a433b6894d3bdb8824b43896',
|
|
|
|
decimals: 18,
|
|
|
|
symbol: 'ABC',
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
address: '0x8d6b81208414189a58339873ab429b6c47ab92d3',
|
|
|
|
decimals: 4,
|
|
|
|
symbol: 'DEF',
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
address: '0xa42084c8d1d9a2198631988579bb36b48433a72b',
|
|
|
|
decimals: 18,
|
|
|
|
symbol: 'GHI',
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
|
|
|
],
|
2020-11-03 00:41:28 +01:00
|
|
|
transactions: {},
|
|
|
|
currentNetworkTxList: [
|
2018-05-14 14:13:55 +02:00
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
id: 'mockTokenTx1',
|
|
|
|
txParams: {
|
|
|
|
to: '0x8d6b81208414189a58339873ab429b6c47ab92d3',
|
|
|
|
from: '0xd85a4b6a394794842887b8284293d69163007bbb',
|
2018-05-14 14:13:55 +02:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
time: 1700000000000,
|
2018-05-14 14:13:55 +02:00
|
|
|
},
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
id: 'mockTokenTx2',
|
|
|
|
txParams: {
|
|
|
|
to: '0xafaketokenaddress',
|
|
|
|
from: '0xd85a4b6a394794842887b8284293d69163007bbb',
|
2018-05-14 14:13:55 +02:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
time: 1600000000000,
|
2018-05-14 14:13:55 +02:00
|
|
|
},
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
id: 'mockTokenTx3',
|
|
|
|
txParams: {
|
|
|
|
to: '0x8d6b81208414189a58339873ab429b6c47ab92d3',
|
|
|
|
from: '0xd85a4b6a394794842887b8284293d69163007bbb',
|
2018-05-14 14:13:55 +02:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
time: 1500000000000,
|
2018-05-14 14:13:55 +02:00
|
|
|
},
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
id: 'mockEthTx1',
|
|
|
|
txParams: {
|
|
|
|
to: '0xd85a4b6a394794842887b8284293d69163007bbb',
|
|
|
|
from: '0xd85a4b6a394794842887b8284293d69163007bbb',
|
2018-05-14 14:13:55 +02:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
time: 1400000000000,
|
2018-05-14 14:57:36 +02:00
|
|
|
},
|
2018-05-14 14:13:55 +02:00
|
|
|
],
|
2020-11-03 00:41:28 +01:00
|
|
|
unapprovedMsgs: {
|
|
|
|
'0xabc': { id: 'unapprovedMessage1', time: 1650000000000 },
|
|
|
|
'0xdef': { id: 'unapprovedMessage2', time: 1550000000000 },
|
|
|
|
'0xghi': { id: 'unapprovedMessage3', time: 1450000000000 },
|
2018-05-14 14:13:55 +02:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
unapprovedMsgCount: 0,
|
|
|
|
unapprovedPersonalMsgs: {},
|
|
|
|
unapprovedPersonalMsgCount: 0,
|
|
|
|
unapprovedDecryptMsgs: {},
|
|
|
|
unapprovedDecryptMsgCount: 0,
|
|
|
|
unapprovedEncryptionPublicKeyMsgs: {},
|
|
|
|
unapprovedEncryptionPublicKeyMsgCount: 0,
|
|
|
|
keyringTypes: ['Simple Key Pair', 'HD Key Tree'],
|
|
|
|
keyrings: [
|
2018-05-05 17:11:53 +02:00
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
type: 'HD Key Tree',
|
|
|
|
accounts: [
|
2018-05-05 17:11:53 +02:00
|
|
|
'fdea65c8e26263f6d9a1b5de9555d2931a33b825',
|
|
|
|
'c5b8dbac4c1d3f152cdeb400e2313f309c410acb',
|
|
|
|
'2f8d4a878cfa04a6e60d46362f5644deab66572d',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
type: 'Simple Key Pair',
|
|
|
|
accounts: ['0xd85a4b6a394794842887b8284293d69163007bbb'],
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
|
|
|
],
|
2020-11-03 00:41:28 +01:00
|
|
|
selectedAddress: '0xd85a4b6a394794842887b8284293d69163007bbb',
|
|
|
|
send: {
|
|
|
|
gasLimit: '0xFFFF',
|
|
|
|
gasPrice: '0xaa',
|
|
|
|
gasTotal: '0xb451dc41b578',
|
|
|
|
tokenBalance: 3434,
|
|
|
|
from: '0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb',
|
|
|
|
to: '0x987fedabc',
|
|
|
|
amount: '0x080',
|
|
|
|
memo: '',
|
|
|
|
errors: {
|
|
|
|
someError: null,
|
|
|
|
},
|
|
|
|
maxModeOn: false,
|
|
|
|
editingTransactionId: 97531,
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
unapprovedTxs: {
|
|
|
|
4768706228115573: {
|
|
|
|
id: 4768706228115573,
|
|
|
|
time: 1487363153561,
|
2020-11-07 08:38:12 +01:00
|
|
|
status: TRANSACTION_STATUSES.UNAPPROVED,
|
2020-11-03 00:41:28 +01:00
|
|
|
gasMultiplier: 1,
|
|
|
|
metamaskNetworkId: '3',
|
|
|
|
txParams: {
|
|
|
|
from: '0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb',
|
|
|
|
to: '0x18a3462427bcc9133bb46e88bcbe39cd7ef0e761',
|
|
|
|
value: '0xde0b6b3a7640000',
|
|
|
|
metamaskId: 4768706228115573,
|
|
|
|
metamaskNetworkId: '3',
|
|
|
|
gas: '0x5209',
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
txFee: '17e0186e60800',
|
|
|
|
txValue: 'de0b6b3a7640000',
|
|
|
|
maxCost: 'de234b52e4a0800',
|
|
|
|
gasPrice: '4a817c800',
|
2018-05-14 14:57:36 +02:00
|
|
|
},
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
currentLocale: 'en',
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
appState: {
|
|
|
|
menuOpen: false,
|
|
|
|
currentView: {
|
|
|
|
name: 'accountDetail',
|
|
|
|
detailView: null,
|
|
|
|
context: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc',
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
accountDetail: {
|
|
|
|
subview: 'transactions',
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
modal: {
|
|
|
|
modalState: {},
|
|
|
|
previousModalState: {},
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
isLoading: false,
|
|
|
|
warning: null,
|
|
|
|
scrollToBottom: false,
|
|
|
|
forgottenPassword: null,
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
identities: {},
|
|
|
|
send: {
|
|
|
|
fromDropdownOpen: false,
|
|
|
|
toDropdownOpen: false,
|
|
|
|
errors: { someError: null },
|
2018-05-05 17:11:53 +02:00
|
|
|
},
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2020-05-19 01:48:11 +02:00
|
|
|
|
2021-02-04 19:15:23 +01:00
|
|
|
export default state;
|