feature/default_network_editable
commit
35282980cf
@ -0,0 +1,34 @@ |
|||||||
|
--- |
||||||
|
name: Bug Report |
||||||
|
about: Using MetaMask, but it's not working as you expect? |
||||||
|
|
||||||
|
--- |
||||||
|
|
||||||
|
<!-- |
||||||
|
BEFORE SUBMITTING: PLEASE SEARCH TO MAKE SURE THIS ISSUE HAS NOT BEEN SUBMITTED |
||||||
|
--> |
||||||
|
|
||||||
|
**Describe the bug** |
||||||
|
A clear and concise description of what the bug is. |
||||||
|
|
||||||
|
**To Reproduce** |
||||||
|
Steps to reproduce the behavior: |
||||||
|
1. Go to '...' |
||||||
|
2. Click on '....' |
||||||
|
3. Scroll down to '....' |
||||||
|
4. See error |
||||||
|
|
||||||
|
**Expected behavior** |
||||||
|
A clear description of what you expected to happen. |
||||||
|
|
||||||
|
**Screenshots** |
||||||
|
If applicable, add screenshots to help explain your problem. |
||||||
|
|
||||||
|
**Browser details (please complete the following information):** |
||||||
|
- OS: [e.g. iOS] |
||||||
|
- Browser [e.g. chrome, safari] |
||||||
|
- MetaMask Version [e.g. 4.9.0] |
||||||
|
- Old UI or New / Beta UI? |
||||||
|
|
||||||
|
**Additional context** |
||||||
|
Add any other context about the problem here. |
@ -0,0 +1,14 @@ |
|||||||
|
--- |
||||||
|
name: Feature Request |
||||||
|
about: Looking for a feature that doesn't exist? Let us know! |
||||||
|
|
||||||
|
--- |
||||||
|
|
||||||
|
**What problem are you trying to solve?** |
||||||
|
A short description of what you're trying to do. E.g., "My users need to wrap ETH, but they're intimidated by the confirm screen..." or "I'm trying to debug my application, and XYZ..." |
||||||
|
|
||||||
|
**Describe the solution you'd like** |
||||||
|
A clear and concise description of what you want to happen. Try to also include any alternative solutions you've considered. |
||||||
|
|
||||||
|
**Additional context** |
||||||
|
Add any other context or screenshots about the feature request here. |
@ -0,0 +1,9 @@ |
|||||||
|
--- |
||||||
|
name: Support Request or Question |
||||||
|
about: Have a question about how to use MetaMask? |
||||||
|
|
||||||
|
--- |
||||||
|
|
||||||
|
FOR USER QUESTIONS, PLEASE DO NOT OPEN A GITHUB ISSUE - IT WILL NOT BE HANDLED HERE. |
||||||
|
|
||||||
|
INSTEAD, PLEASE EMAIL SUPPORT@METAMASK.IO WITH A DESCRIPTION OF YOUR PROBLEM. |
@ -0,0 +1,46 @@ |
|||||||
|
const assert = require('assert') |
||||||
|
const migration28 = require('../../../app/scripts/migrations/028') |
||||||
|
|
||||||
|
const oldStorage = { |
||||||
|
'meta': {}, |
||||||
|
'data': { |
||||||
|
'PreferencesController': { |
||||||
|
'tokens': [{address: '0xa', symbol: 'A', decimals: 4}, {address: '0xb', symbol: 'B', decimals: 4}], |
||||||
|
'identities': { |
||||||
|
'0x6d14': {}, |
||||||
|
'0x3695': {}, |
||||||
|
}, |
||||||
|
}, |
||||||
|
}, |
||||||
|
} |
||||||
|
|
||||||
|
describe('migration #28', () => { |
||||||
|
it('should add corresponding tokens to accountTokens', (done) => { |
||||||
|
migration28.migrate(oldStorage) |
||||||
|
.then((newStorage) => { |
||||||
|
const newTokens = newStorage.data.PreferencesController.tokens |
||||||
|
const newAccountTokens = newStorage.data.PreferencesController.accountTokens |
||||||
|
|
||||||
|
const testTokens = [{address: '0xa', symbol: 'A', decimals: 4}, {address: '0xb', symbol: 'B', decimals: 4}] |
||||||
|
assert.equal(newTokens.length, 0, 'tokens is expected to have the length of 0') |
||||||
|
assert.equal(newAccountTokens['0x6d14']['mainnet'].length, 2, 'tokens for address is expected to have the length of 2') |
||||||
|
assert.equal(newAccountTokens['0x3695']['mainnet'].length, 2, 'tokens for address is expected to have the length of 2') |
||||||
|
assert.equal(Object.keys(newAccountTokens).length, 2, 'account tokens should be created for all identities') |
||||||
|
assert.deepEqual(newAccountTokens['0x6d14']['mainnet'], testTokens, 'tokens for address should be the same than before') |
||||||
|
assert.deepEqual(newAccountTokens['0x3695']['mainnet'], testTokens, 'tokens for address should be the same than before') |
||||||
|
done() |
||||||
|
}) |
||||||
|
.catch(done) |
||||||
|
}) |
||||||
|
|
||||||
|
it('should successfully migrate first time state', (done) => { |
||||||
|
migration28.migrate({ |
||||||
|
meta: {}, |
||||||
|
data: require('../../../app/scripts/first-time-state'), |
||||||
|
}) |
||||||
|
.then((migratedData) => { |
||||||
|
assert.equal(migratedData.meta.version, migration28.version) |
||||||
|
done() |
||||||
|
}).catch(done) |
||||||
|
}) |
||||||
|
}) |
@ -1,3 +1,3 @@ |
|||||||
export const INSUFFICIENT_FUNDS_ERROR_KEY = 'insufficientFunds' |
export const INSUFFICIENT_FUNDS_ERROR_KEY = 'insufficientFunds' |
||||||
export const GAS_LIMIT_TOO_LOW_ERROR_KEY = 'gasLimitTooLow' |
export const GAS_LIMIT_TOO_LOW_ERROR_KEY = 'gasLimitTooLow' |
||||||
export const TRANSACTION_ERROR = 'transactionError' |
export const TRANSACTION_ERROR_KEY = 'transactionError' |
||||||
|
Loading…
Reference in new issue