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