|
|
|
@ -646,9 +646,14 @@ describe('MetaMetricsController', function () { |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
threeBoxSyncingAllowed: false, |
|
|
|
|
addressBook: { |
|
|
|
|
[MAINNET_CHAIN_ID]: [{ address: '0x' }], |
|
|
|
|
[ROPSTEN_CHAIN_ID]: [{ address: '0x' }, { address: '0x0' }], |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
assert.deepEqual(traits, { |
|
|
|
|
[TRAITS.ADDRESS_BOOK_ENTRIES]: 3, |
|
|
|
|
[TRAITS.LEDGER_CONNECTION_TYPE]: 'web-hid', |
|
|
|
|
[TRAITS.NETWORKS_ADDED]: [MAINNET_CHAIN_ID, ROPSTEN_CHAIN_ID], |
|
|
|
|
[TRAITS.NUMBER_OF_ACCOUNTS]: 2, |
|
|
|
@ -667,6 +672,10 @@ describe('MetaMetricsController', function () { |
|
|
|
|
ledgerTransportType: 'web-hid', |
|
|
|
|
identities: [{}, {}], |
|
|
|
|
threeBoxSyncingAllowed: false, |
|
|
|
|
addressBook: { |
|
|
|
|
[MAINNET_CHAIN_ID]: [{ address: '0x' }], |
|
|
|
|
[ROPSTEN_CHAIN_ID]: [{ address: '0x' }, { address: '0x0' }], |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const updatedTraits = metaMetricsController._buildUserTraitsObject({ |
|
|
|
@ -677,9 +686,14 @@ describe('MetaMetricsController', function () { |
|
|
|
|
ledgerTransportType: 'web-hid', |
|
|
|
|
identities: [{}, {}, {}], |
|
|
|
|
threeBoxSyncingAllowed: false, |
|
|
|
|
addressBook: { |
|
|
|
|
[MAINNET_CHAIN_ID]: [{ address: '0x' }, { address: '0x1' }], |
|
|
|
|
[ROPSTEN_CHAIN_ID]: [{ address: '0x' }, { address: '0x0' }], |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
assert.deepEqual(updatedTraits, { |
|
|
|
|
[TRAITS.ADDRESS_BOOK_ENTRIES]: 4, |
|
|
|
|
[TRAITS.NUMBER_OF_ACCOUNTS]: 3, |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
@ -694,6 +708,10 @@ describe('MetaMetricsController', function () { |
|
|
|
|
ledgerTransportType: 'web-hid', |
|
|
|
|
identities: [{}, {}], |
|
|
|
|
threeBoxSyncingAllowed: false, |
|
|
|
|
addressBook: { |
|
|
|
|
[MAINNET_CHAIN_ID]: [{ address: '0x' }], |
|
|
|
|
[ROPSTEN_CHAIN_ID]: [{ address: '0x' }, { address: '0x0' }], |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const updatedTraits = metaMetricsController._buildUserTraitsObject({ |
|
|
|
@ -704,6 +722,10 @@ describe('MetaMetricsController', function () { |
|
|
|
|
ledgerTransportType: 'web-hid', |
|
|
|
|
identities: [{}, {}], |
|
|
|
|
threeBoxSyncingAllowed: false, |
|
|
|
|
addressBook: { |
|
|
|
|
[MAINNET_CHAIN_ID]: [{ address: '0x' }], |
|
|
|
|
[ROPSTEN_CHAIN_ID]: [{ address: '0x' }, { address: '0x0' }], |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
assert.equal(updatedTraits, null); |
|
|
|
|