commit
4901164e5c
@ -1,37 +0,0 @@ |
|||||||
--- |
|
||||||
name: Bug Report |
|
||||||
about: Using MetaMask, but it's not working as you expect? |
|
||||||
|
|
||||||
--- |
|
||||||
|
|
||||||
<!-- |
|
||||||
BEFORE SUBMITTING: |
|
||||||
1) Please search to make sure this issue has not been opened already |
|
||||||
2) If this is an implementation question or trouble with your personal project, please post on StackExchange. This will get your question answered more quickly and make it easier for other devs to find the answer in the future. |
|
||||||
--> |
|
||||||
|
|
||||||
**Describe the bug** |
|
||||||
A clear and concise description of what the bug is. |
|
||||||
|
|
||||||
**Steps to reproduce (REQUIRED)** |
|
||||||
Steps to reproduce the behavior, libraries used with version number, and/or any setup information to easily reproduce: |
|
||||||
|
|
||||||
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. OS X, Windows] |
|
||||||
- Hardware Wallet: [e.g. Trezor Firmware version 1.8.3, Ledger Nano S Firmware version 1.6.0] |
|
||||||
- Browser: [e.g. Chrome Version 79.0.3945.79 (Official Build) (64-bit), Firefox Browser 71.0 (64-bit)] |
|
||||||
- MetaMask Version: [e.g. 5.0.2 - find it in Settings > About] |
|
||||||
|
|
||||||
**Additional context (Error Messages, etc.)** |
|
||||||
Add any other context about the problem here. |
|
@ -0,0 +1,97 @@ |
|||||||
|
name: Bug Report |
||||||
|
description: Using MetaMask, but it's not working as you expect? |
||||||
|
title: "[Bug]: " |
||||||
|
labels: ["bug"] |
||||||
|
body: |
||||||
|
- type: markdown |
||||||
|
attributes: |
||||||
|
value: | |
||||||
|
Thanks for taking the time to fill out this bug report! |
||||||
|
|
||||||
|
## **Before Submitting:** |
||||||
|
|
||||||
|
* Please search to make sure this issue has not been opened already. |
||||||
|
* If this is a question about how to integrate MetaMask with your project, please ask in our [Community forum](https://community.metamask.io/c/developer-questions/) instead. This will get your question answered more quickly and make it easier for other devs to find the answer in the future. |
||||||
|
- type: textarea |
||||||
|
id: what-happened |
||||||
|
attributes: |
||||||
|
label: Describe the bug |
||||||
|
description: What happened? What did you expect to happen? Please include screenshots if applicable! |
||||||
|
placeholder: Tell us what you see! |
||||||
|
validations: |
||||||
|
required: true |
||||||
|
- type: textarea |
||||||
|
id: reproduce |
||||||
|
attributes: |
||||||
|
label: Steps to reproduce |
||||||
|
description: List all steps needed to reproduce the problem |
||||||
|
value: | |
||||||
|
1. |
||||||
|
validations: |
||||||
|
required: true |
||||||
|
- type: textarea |
||||||
|
id: error |
||||||
|
attributes: |
||||||
|
label: Error messages or log output |
||||||
|
description: Please copy and paste any relevant error messages or log output. This will be automatically formatted, so there is no need for backticks. |
||||||
|
render: shell |
||||||
|
- type: input |
||||||
|
id: version |
||||||
|
attributes: |
||||||
|
label: Version |
||||||
|
description: What version of MetaMask are you running? You can find the version in "Settings" > "About" |
||||||
|
validations: |
||||||
|
required: true |
||||||
|
- type: dropdown |
||||||
|
id: build |
||||||
|
attributes: |
||||||
|
label: Build type |
||||||
|
description: Are you using a testing or development build of MetaMask? If so, please select the type of build you are using. |
||||||
|
options: |
||||||
|
- Beta |
||||||
|
- Flask |
||||||
|
- Other (please specify exactly where you obtained this build in "Additional Context" section) |
||||||
|
- type: dropdown |
||||||
|
id: browsers |
||||||
|
attributes: |
||||||
|
label: Browser |
||||||
|
description: Which browsers have you seen the problem on? |
||||||
|
multiple: true |
||||||
|
options: |
||||||
|
- Chrome |
||||||
|
- Firefox |
||||||
|
- Microsoft Edge |
||||||
|
- Brave |
||||||
|
- Other (please elaborate in the "Additional Context" section) |
||||||
|
validations: |
||||||
|
required: true |
||||||
|
- type: dropdown |
||||||
|
id: os |
||||||
|
attributes: |
||||||
|
label: Operating system |
||||||
|
description: Which operating systems have you seen the problem on? |
||||||
|
multiple: true |
||||||
|
options: |
||||||
|
- Windows |
||||||
|
- MacOS |
||||||
|
- Linux |
||||||
|
- Other (please elaborate in the "Additional Context" section) |
||||||
|
validations: |
||||||
|
required: true |
||||||
|
- type: dropdown |
||||||
|
id: hardware-wallet |
||||||
|
attributes: |
||||||
|
label: Hardware wallet |
||||||
|
description: Are you using any of these hardware wallets? Please include the firmware version in the "Additional context" section below for any that you select here. |
||||||
|
multiple: true |
||||||
|
options: |
||||||
|
- Ledger |
||||||
|
- Trezor |
||||||
|
- Keystone |
||||||
|
- GridPlus Lattice1 |
||||||
|
- Other (please elaborate in the "Additional Context" section) |
||||||
|
- type: textarea |
||||||
|
id: additional |
||||||
|
attributes: |
||||||
|
label: Additional context |
||||||
|
description: Add any other context about the problem here, e.g. related issues, additional error messages or logs, or any potentially relevant details about the environment or situation the bug occurred in. |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 6.0 KiB |
@ -0,0 +1,116 @@ |
|||||||
|
WEBVTT |
||||||
|
|
||||||
|
1 |
||||||
|
00:00:00.780 --> 00:00:04.580 |
||||||
|
MetaMask ist eine neue Möglichkeit, sich mit |
||||||
|
Webseiten und Anwendungen zu verbinden. |
||||||
|
|
||||||
|
2 |
||||||
|
00:00:04.580 --> 00:00:08.860 |
||||||
|
Auf traditionellen Webseiten ist eine |
||||||
|
zentrale Datenbank für die Steuerung und |
||||||
|
|
||||||
|
3 |
||||||
|
00:00:08.860 --> 00:00:10.179 |
||||||
|
Wiederherstellung der Konten zuständig. |
||||||
|
|
||||||
|
4 |
||||||
|
00:00:10.179 --> 00:00:15.050 |
||||||
|
Bei MetaMask gehört all diese Macht dem |
||||||
|
Besitzer eines „Hauptschlüssels“. |
||||||
|
|
||||||
|
5 |
||||||
|
00:00:15.050 --> 00:00:18.460 |
||||||
|
Wer den Schlüssel besitzt, kontrolliert |
||||||
|
das Wallet und damit die Konten. |
||||||
|
|
||||||
|
6 |
||||||
|
00:00:18.460 --> 00:00:21.110 |
||||||
|
Der geheime Satz zur Wiederherstellung |
||||||
|
Deines Wallets ist der „Hauptschlüssel“. |
||||||
|
|
||||||
|
7 |
||||||
|
00:00:21.110 --> 00:00:26.070 |
||||||
|
Es ist eine Reihe von 12 Wörtern, welche generiert werden, |
||||||
|
wenn MetaMask zum ersten Mal eingerichtet wird, diese erlauben dir |
||||||
|
|
||||||
|
8 |
||||||
|
00:00:26.070 --> 00:00:30.120 |
||||||
|
Deinen „Hauptschlüssel“ zu Deinem Wallet wieder herzustellen, |
||||||
|
solltest Du jemals den Zugriff darauf verlieren. |
||||||
|
|
||||||
|
9 |
||||||
|
00:00:30.120 --> 00:00:33.451 |
||||||
|
Es ist wichtig, dass Du Dein Wallet sicherst, |
||||||
|
indem Du Deinen geheimen |
||||||
|
|
||||||
|
10 |
||||||
|
00:00:33.451 --> 00:00:37.510 |
||||||
|
Wiederherstellungssatz sicher |
||||||
|
und geheim verwahrst. |
||||||
|
|
||||||
|
11 |
||||||
|
00:00:37.510 --> 00:00:41.429 |
||||||
|
Wenn jemand Zugriff darauf erhält, hat er |
||||||
|
den „Hauptschlüssel“ für Dein Wallet und kann |
||||||
|
|
||||||
|
12 |
||||||
|
00:00:41.429 --> 00:00:45.190 |
||||||
|
frei auf Deine Konten zugreifen und alle Gelder stehlen. |
||||||
|
|
||||||
|
13 |
||||||
|
00:00:45.190 --> 00:00:50.109 |
||||||
|
Um Dein MetaMask-Wallet zu sichern, musst Du Deinen |
||||||
|
geheimen Wiederherstellungssatz sicher speichern. |
||||||
|
|
||||||
|
14 |
||||||
|
00:00:50.109 --> 00:00:54.930 |
||||||
|
Du kannst ihn aufschreiben, irgendwo verstecken, |
||||||
|
in ein Schließfach legen |
||||||
|
|
||||||
|
15 |
||||||
|
00:00:54.930 --> 00:00:57.729 |
||||||
|
oder in einen sicheren Passwort-Manager speichern. |
||||||
|
|
||||||
|
16 |
||||||
|
00:00:57.729 --> 00:01:01.050 |
||||||
|
Einige Benutzer gravieren ihren |
||||||
|
Satz sogar auf eine Metallplatte. |
||||||
|
|
||||||
|
17 |
||||||
|
00:01:01.050 --> 00:01:04.440 |
||||||
|
Niemand, nicht einmal das Team von MetaMask, |
||||||
|
kann Dir dabei helfen |
||||||
|
|
||||||
|
18 |
||||||
|
00:01:04.440 --> 00:01:07.820 |
||||||
|
Dein Wallet wiederherzustellen, wenn Du Deinen |
||||||
|
geheimen Wiederherstellungssatz verlierst. |
||||||
|
|
||||||
|
19 |
||||||
|
00:01:07.820 --> 00:01:12.072 |
||||||
|
Wenn Du Deinen geheimen Wiederherstellungssatz noch nicht |
||||||
|
aufgeschrieben und an einem sicheren Ort aufbewahrt hast, |
||||||
|
|
||||||
|
20 |
||||||
|
00:01:12.072 --> 00:01:15.492 |
||||||
|
mach es jetzt. Wir warten solange. |
||||||
|
|
||||||
|
21 |
||||||
|
00:01:15.500 --> 00:01:20.780 |
||||||
|
Und denk daran, teilen Deinen geheimen Wiederherstellungssatz |
||||||
|
niemals: nicht einmal mit uns. |
||||||
|
|
||||||
|
22 |
||||||
|
00:01:20.780 --> 00:01:24.910 |
||||||
|
Wenn dich jemals jemand danach fragt, |
||||||
|
versucht er dich zu betrügen. |
||||||
|
|
||||||
|
23 |
||||||
|
00:01:24.910 --> 00:01:26.250 |
||||||
|
Das ist alles! |
||||||
|
|
||||||
|
24 |
||||||
|
00:01:26.250 --> 00:01:31.020 |
||||||
|
Jetzt weist Du, was ein geheimer Wiederherstellungssatz ist |
||||||
|
und wie Du dafür sorgst, das Dein Wallete sicher bleibt. |
@ -0,0 +1,145 @@ |
|||||||
|
{ |
||||||
|
"data": { |
||||||
|
"AppStateController": { |
||||||
|
"mkrMigrationReminderTimestamp": null, |
||||||
|
"swapsWelcomeMessageHasBeenShown": true |
||||||
|
}, |
||||||
|
"CachedBalancesController": { |
||||||
|
"cachedBalances": { |
||||||
|
"4": {} |
||||||
|
} |
||||||
|
}, |
||||||
|
"CurrencyController": { |
||||||
|
"conversionDate": 1575697244.188, |
||||||
|
"conversionRate": 149.61, |
||||||
|
"currentCurrency": "usd", |
||||||
|
"nativeCurrency": "ETH" |
||||||
|
}, |
||||||
|
"IncomingTransactionsController": { |
||||||
|
"incomingTransactions": {}, |
||||||
|
"incomingTxLastFetchedBlocksByNetwork": { |
||||||
|
"goerli": null, |
||||||
|
"kovan": null, |
||||||
|
"mainnet": null, |
||||||
|
"rinkeby": 5570536 |
||||||
|
} |
||||||
|
}, |
||||||
|
"KeyringController": { |
||||||
|
"vault": "{\"data\":\"s6TpYjlUNsn7ifhEFTkuDGBUM1GyOlPrim7JSjtfIxgTt8/6MiXgiR/CtFfR4dWW2xhq85/NGIBYEeWrZThGdKGarBzeIqBfLFhw9n509jprzJ0zc2Rf+9HVFGLw+xxC4xPxgCS0IIWeAJQ+XtGcHmn0UZXriXm8Ja4kdlow6SWinB7sr/WM3R0+frYs4WgllkwggDf2/Tv6VHygvLnhtzp6hIJFyTjh+l/KnyJTyZW1TkZhDaNDzX3SCOHT\",\"iv\":\"FbeHDAW5afeWNORfNJBR0Q==\",\"salt\":\"TxZ+WbCW6891C9LK/hbMAoUsSEW1E8pyGLVBU6x5KR8=\"}" |
||||||
|
}, |
||||||
|
"NetworkController": { |
||||||
|
"network": "1337", |
||||||
|
"provider": { |
||||||
|
"nickname": "Localhost 8545", |
||||||
|
"rpcUrl": "http://localhost:8545", |
||||||
|
"chainId": "0x539", |
||||||
|
"ticker": "ETH", |
||||||
|
"type": "rpc" |
||||||
|
} |
||||||
|
}, |
||||||
|
"NotificationController": { |
||||||
|
"notifications": { |
||||||
|
"1": { |
||||||
|
"isShown": true |
||||||
|
}, |
||||||
|
"3": { |
||||||
|
"isShown": true |
||||||
|
}, |
||||||
|
"5": { |
||||||
|
"isShown": true |
||||||
|
}, |
||||||
|
"6": { |
||||||
|
"isShown": true |
||||||
|
}, |
||||||
|
"8": { |
||||||
|
"isShown": true |
||||||
|
} |
||||||
|
} |
||||||
|
}, |
||||||
|
"OnboardingController": { |
||||||
|
"onboardingTabs": {}, |
||||||
|
"seedPhraseBackedUp": false |
||||||
|
}, |
||||||
|
"PermissionsMetadata": { |
||||||
|
"domainMetadata": { |
||||||
|
"metamask.github.io": { |
||||||
|
"icon": null, |
||||||
|
"name": "M E T A M A S K M E S H T E S T" |
||||||
|
} |
||||||
|
}, |
||||||
|
"permissionsHistory": {}, |
||||||
|
"permissionsLog": [ |
||||||
|
{ |
||||||
|
"id": 746677923, |
||||||
|
"method": "eth_accounts", |
||||||
|
"methodType": "restricted", |
||||||
|
"origin": "metamask.github.io", |
||||||
|
"request": { |
||||||
|
"id": 746677923, |
||||||
|
"jsonrpc": "2.0", |
||||||
|
"method": "eth_accounts", |
||||||
|
"origin": "metamask.github.io", |
||||||
|
"params": [] |
||||||
|
}, |
||||||
|
"requestTime": 1575697241368, |
||||||
|
"response": { |
||||||
|
"id": 746677923, |
||||||
|
"jsonrpc": "2.0", |
||||||
|
"result": [] |
||||||
|
}, |
||||||
|
"responseTime": 1575697241370, |
||||||
|
"success": true |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"PreferencesController": { |
||||||
|
"accountTokens": { |
||||||
|
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": { |
||||||
|
"rinkeby": [], |
||||||
|
"ropsten": [] |
||||||
|
} |
||||||
|
}, |
||||||
|
"assetImages": {}, |
||||||
|
"completedOnboarding": true, |
||||||
|
"eip1559V2Enabled": true, |
||||||
|
"currentLocale": "en", |
||||||
|
"featureFlags": { |
||||||
|
"showIncomingTransactions": true, |
||||||
|
"transactionTime": false |
||||||
|
}, |
||||||
|
"firstTimeFlowType": "create", |
||||||
|
"forgottenPassword": false, |
||||||
|
"frequentRpcListDetail": [], |
||||||
|
"identities": { |
||||||
|
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": { |
||||||
|
"address": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1", |
||||||
|
"name": "Account 1" |
||||||
|
} |
||||||
|
}, |
||||||
|
"knownMethodData": {}, |
||||||
|
"lostIdentities": {}, |
||||||
|
"metaMetricsId": null, |
||||||
|
"participateInMetaMetrics": false, |
||||||
|
"preferences": { |
||||||
|
"useNativeCurrencyAsPrimaryCurrency": true |
||||||
|
}, |
||||||
|
"selectedAddress": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1", |
||||||
|
"suggestedTokens": {}, |
||||||
|
"tokens": [], |
||||||
|
"useBlockie": false, |
||||||
|
"useNonceField": false, |
||||||
|
"usePhishDetect": true |
||||||
|
}, |
||||||
|
"TransactionController": { |
||||||
|
"transactions": {} |
||||||
|
}, |
||||||
|
"config": {}, |
||||||
|
"firstTimeInfo": { |
||||||
|
"date": 1575697234195, |
||||||
|
"version": "7.7.0" |
||||||
|
} |
||||||
|
}, |
||||||
|
"meta": { |
||||||
|
"version": 40 |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,214 @@ |
|||||||
|
{ |
||||||
|
"data": { |
||||||
|
"AppStateController": { |
||||||
|
"mkrMigrationReminderTimestamp": null, |
||||||
|
"swapsWelcomeMessageHasBeenShown": true |
||||||
|
}, |
||||||
|
"CachedBalancesController": { |
||||||
|
"cachedBalances": { |
||||||
|
"4": {} |
||||||
|
} |
||||||
|
}, |
||||||
|
"CurrencyController": { |
||||||
|
"conversionDate": 1575697244.188, |
||||||
|
"conversionRate": 149.61, |
||||||
|
"currentCurrency": "usd", |
||||||
|
"nativeCurrency": "ETH" |
||||||
|
}, |
||||||
|
"IncomingTransactionsController": { |
||||||
|
"incomingTransactions": {}, |
||||||
|
"incomingTxLastFetchedBlocksByNetwork": { |
||||||
|
"goerli": null, |
||||||
|
"kovan": null, |
||||||
|
"mainnet": null, |
||||||
|
"rinkeby": 5570536 |
||||||
|
} |
||||||
|
}, |
||||||
|
"KeyringController": { |
||||||
|
"vault": "{\"data\":\"s6TpYjlUNsn7ifhEFTkuDGBUM1GyOlPrim7JSjtfIxgTt8/6MiXgiR/CtFfR4dWW2xhq85/NGIBYEeWrZThGdKGarBzeIqBfLFhw9n509jprzJ0zc2Rf+9HVFGLw+xxC4xPxgCS0IIWeAJQ+XtGcHmn0UZXriXm8Ja4kdlow6SWinB7sr/WM3R0+frYs4WgllkwggDf2/Tv6VHygvLnhtzp6hIJFyTjh+l/KnyJTyZW1TkZhDaNDzX3SCOHT\",\"iv\":\"FbeHDAW5afeWNORfNJBR0Q==\",\"salt\":\"TxZ+WbCW6891C9LK/hbMAoUsSEW1E8pyGLVBU6x5KR8=\"}" |
||||||
|
}, |
||||||
|
"NetworkController": { |
||||||
|
"network": "1337", |
||||||
|
"provider": { |
||||||
|
"nickname": "Localhost 8545", |
||||||
|
"rpcUrl": "http://localhost:8545", |
||||||
|
"chainId": "0x539", |
||||||
|
"ticker": "ETH", |
||||||
|
"type": "rpc" |
||||||
|
} |
||||||
|
}, |
||||||
|
"NotificationController": { |
||||||
|
"notifications": { |
||||||
|
"1": { |
||||||
|
"isShown": true |
||||||
|
}, |
||||||
|
"3": { |
||||||
|
"isShown": true |
||||||
|
}, |
||||||
|
"5": { |
||||||
|
"isShown": true |
||||||
|
}, |
||||||
|
"6": { |
||||||
|
"isShown": true |
||||||
|
}, |
||||||
|
"8": { |
||||||
|
"isShown": true |
||||||
|
} |
||||||
|
} |
||||||
|
}, |
||||||
|
"OnboardingController": { |
||||||
|
"onboardingTabs": {}, |
||||||
|
"seedPhraseBackedUp": false |
||||||
|
}, |
||||||
|
"PermissionsMetadata": { |
||||||
|
"domainMetadata": { |
||||||
|
"metamask.github.io": { |
||||||
|
"icon": null, |
||||||
|
"name": "M E T A M A S K M E S H T E S T" |
||||||
|
} |
||||||
|
}, |
||||||
|
"permissionsHistory": {}, |
||||||
|
"permissionsLog": [ |
||||||
|
{ |
||||||
|
"id": 746677923, |
||||||
|
"method": "eth_accounts", |
||||||
|
"methodType": "restricted", |
||||||
|
"origin": "metamask.github.io", |
||||||
|
"request": { |
||||||
|
"id": 746677923, |
||||||
|
"jsonrpc": "2.0", |
||||||
|
"method": "eth_accounts", |
||||||
|
"origin": "metamask.github.io", |
||||||
|
"params": [] |
||||||
|
}, |
||||||
|
"requestTime": 1575697241368, |
||||||
|
"response": { |
||||||
|
"id": 746677923, |
||||||
|
"jsonrpc": "2.0", |
||||||
|
"result": [] |
||||||
|
}, |
||||||
|
"responseTime": 1575697241370, |
||||||
|
"success": true |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"PreferencesController": { |
||||||
|
"accountTokens": { |
||||||
|
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": { |
||||||
|
"rinkeby": [], |
||||||
|
"ropsten": [] |
||||||
|
} |
||||||
|
}, |
||||||
|
"assetImages": {}, |
||||||
|
"completedOnboarding": true, |
||||||
|
"eip1559V2Enabled": true, |
||||||
|
"currentLocale": "en", |
||||||
|
"featureFlags": { |
||||||
|
"showIncomingTransactions": true, |
||||||
|
"transactionTime": false |
||||||
|
}, |
||||||
|
"firstTimeFlowType": "create", |
||||||
|
"forgottenPassword": false, |
||||||
|
"frequentRpcListDetail": [], |
||||||
|
"identities": { |
||||||
|
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": { |
||||||
|
"address": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1", |
||||||
|
"name": "Account 1" |
||||||
|
} |
||||||
|
}, |
||||||
|
"knownMethodData": {}, |
||||||
|
"lostIdentities": {}, |
||||||
|
"metaMetricsId": null, |
||||||
|
"participateInMetaMetrics": false, |
||||||
|
"preferences": { |
||||||
|
"useNativeCurrencyAsPrimaryCurrency": true |
||||||
|
}, |
||||||
|
"selectedAddress": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1", |
||||||
|
"suggestedTokens": {}, |
||||||
|
"tokens": [], |
||||||
|
"useBlockie": false, |
||||||
|
"useNonceField": false, |
||||||
|
"usePhishDetect": true |
||||||
|
}, |
||||||
|
"TransactionController": { |
||||||
|
"transactions": { |
||||||
|
"4046084157914634": { |
||||||
|
"chainId": "0x539", |
||||||
|
"primaryTransaction": { |
||||||
|
"chainId": "0x539", |
||||||
|
"id": 4046084157914634, |
||||||
|
"loadingDefaults": true, |
||||||
|
"metamaskNetworkId": "1337", |
||||||
|
"origin": "metamask", |
||||||
|
"status": "unapproved", |
||||||
|
"time": 1617228030067, |
||||||
|
"txParams": { |
||||||
|
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1", |
||||||
|
"gas": "0x61a8", |
||||||
|
"maxFeePerGas": "0x59682f0c", |
||||||
|
"maxPriorityFeePerGas": "0x59682f00", |
||||||
|
"type": "0x2", |
||||||
|
"to": "0x2f318C334780961FB129D2a6c30D0763d9a5C970", |
||||||
|
"value": "0x1e87F85809dc0000" |
||||||
|
}, |
||||||
|
"type": "sentEther" |
||||||
|
}, |
||||||
|
"history": [ |
||||||
|
{ |
||||||
|
"chainId": "0x539", |
||||||
|
"id": 4046084157914634, |
||||||
|
"loadingDefaults": true, |
||||||
|
"metamaskNetworkId": "1337", |
||||||
|
"origin": "metamask", |
||||||
|
"status": "unapproved", |
||||||
|
"time": 1617228030067, |
||||||
|
"txParams": { |
||||||
|
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1", |
||||||
|
"gas": "0x61a8", |
||||||
|
"maxFeePerGas": "0x59682f0c", |
||||||
|
"maxPriorityFeePerGas": "0x59682f00", |
||||||
|
"type": "0x2", |
||||||
|
"to": "0x2f318C334780961FB129D2a6c30D0763d9a5C970", |
||||||
|
"value": "0x1e87F85809dc0000" |
||||||
|
}, |
||||||
|
"type": "simpleSend" |
||||||
|
}, |
||||||
|
[ |
||||||
|
{ |
||||||
|
"note": "Added new unapproved transaction.", |
||||||
|
"op": "replace", |
||||||
|
"path": "/loadingDefaults", |
||||||
|
"timestamp": 1617228030069, |
||||||
|
"value": false |
||||||
|
} |
||||||
|
] |
||||||
|
], |
||||||
|
"id": 4046084157914634, |
||||||
|
"loadingDefaults": false, |
||||||
|
"metamaskNetworkId": "1337", |
||||||
|
"origin": "metamask", |
||||||
|
"status": "unapproved", |
||||||
|
"time": 1617228030067, |
||||||
|
"txParams": { |
||||||
|
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1", |
||||||
|
"gas": "0x61a8", |
||||||
|
"maxFeePerGas": "0x59682f0c", |
||||||
|
"maxPriorityFeePerGas": "0x59682f00", |
||||||
|
"type": "0x2", |
||||||
|
"to": "0x2f318C334780961FB129D2a6c30D0763d9a5C970", |
||||||
|
"value": "0x1e87F85809dc0000" |
||||||
|
}, |
||||||
|
"type": "simpleSend" |
||||||
|
} |
||||||
|
} |
||||||
|
}, |
||||||
|
"config": {}, |
||||||
|
"firstTimeInfo": { |
||||||
|
"date": 1575697234195, |
||||||
|
"version": "7.7.0" |
||||||
|
} |
||||||
|
}, |
||||||
|
"meta": { |
||||||
|
"version": 40 |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,214 @@ |
|||||||
|
{ |
||||||
|
"data": { |
||||||
|
"AppStateController": { |
||||||
|
"mkrMigrationReminderTimestamp": null, |
||||||
|
"swapsWelcomeMessageHasBeenShown": true |
||||||
|
}, |
||||||
|
"CachedBalancesController": { |
||||||
|
"cachedBalances": { |
||||||
|
"4": {} |
||||||
|
} |
||||||
|
}, |
||||||
|
"CurrencyController": { |
||||||
|
"conversionDate": 1575697244.188, |
||||||
|
"conversionRate": 149.61, |
||||||
|
"currentCurrency": "usd", |
||||||
|
"nativeCurrency": "ETH" |
||||||
|
}, |
||||||
|
"IncomingTransactionsController": { |
||||||
|
"incomingTransactions": {}, |
||||||
|
"incomingTxLastFetchedBlocksByNetwork": { |
||||||
|
"goerli": null, |
||||||
|
"kovan": null, |
||||||
|
"mainnet": null, |
||||||
|
"rinkeby": 5570536 |
||||||
|
} |
||||||
|
}, |
||||||
|
"KeyringController": { |
||||||
|
"vault": "{\"data\":\"s6TpYjlUNsn7ifhEFTkuDGBUM1GyOlPrim7JSjtfIxgTt8/6MiXgiR/CtFfR4dWW2xhq85/NGIBYEeWrZThGdKGarBzeIqBfLFhw9n509jprzJ0zc2Rf+9HVFGLw+xxC4xPxgCS0IIWeAJQ+XtGcHmn0UZXriXm8Ja4kdlow6SWinB7sr/WM3R0+frYs4WgllkwggDf2/Tv6VHygvLnhtzp6hIJFyTjh+l/KnyJTyZW1TkZhDaNDzX3SCOHT\",\"iv\":\"FbeHDAW5afeWNORfNJBR0Q==\",\"salt\":\"TxZ+WbCW6891C9LK/hbMAoUsSEW1E8pyGLVBU6x5KR8=\"}" |
||||||
|
}, |
||||||
|
"NetworkController": { |
||||||
|
"network": "1337", |
||||||
|
"provider": { |
||||||
|
"nickname": "Localhost 8545", |
||||||
|
"rpcUrl": "http://localhost:8545", |
||||||
|
"chainId": "0x539", |
||||||
|
"ticker": "ETH", |
||||||
|
"type": "rpc" |
||||||
|
} |
||||||
|
}, |
||||||
|
"NotificationController": { |
||||||
|
"notifications": { |
||||||
|
"1": { |
||||||
|
"isShown": true |
||||||
|
}, |
||||||
|
"3": { |
||||||
|
"isShown": true |
||||||
|
}, |
||||||
|
"5": { |
||||||
|
"isShown": true |
||||||
|
}, |
||||||
|
"6": { |
||||||
|
"isShown": true |
||||||
|
}, |
||||||
|
"8": { |
||||||
|
"isShown": true |
||||||
|
} |
||||||
|
} |
||||||
|
}, |
||||||
|
"OnboardingController": { |
||||||
|
"onboardingTabs": {}, |
||||||
|
"seedPhraseBackedUp": false |
||||||
|
}, |
||||||
|
"PermissionsMetadata": { |
||||||
|
"domainMetadata": { |
||||||
|
"metamask.github.io": { |
||||||
|
"icon": null, |
||||||
|
"name": "M E T A M A S K M E S H T E S T" |
||||||
|
} |
||||||
|
}, |
||||||
|
"permissionsHistory": {}, |
||||||
|
"permissionsLog": [ |
||||||
|
{ |
||||||
|
"id": 746677923, |
||||||
|
"method": "eth_accounts", |
||||||
|
"methodType": "restricted", |
||||||
|
"origin": "metamask.github.io", |
||||||
|
"request": { |
||||||
|
"id": 746677923, |
||||||
|
"jsonrpc": "2.0", |
||||||
|
"method": "eth_accounts", |
||||||
|
"origin": "metamask.github.io", |
||||||
|
"params": [] |
||||||
|
}, |
||||||
|
"requestTime": 1575697241368, |
||||||
|
"response": { |
||||||
|
"id": 746677923, |
||||||
|
"jsonrpc": "2.0", |
||||||
|
"result": [] |
||||||
|
}, |
||||||
|
"responseTime": 1575697241370, |
||||||
|
"success": true |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"PreferencesController": { |
||||||
|
"accountTokens": { |
||||||
|
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": { |
||||||
|
"rinkeby": [], |
||||||
|
"ropsten": [] |
||||||
|
} |
||||||
|
}, |
||||||
|
"assetImages": {}, |
||||||
|
"completedOnboarding": true, |
||||||
|
"eip1559V2Enabled": true, |
||||||
|
"currentLocale": "en", |
||||||
|
"featureFlags": { |
||||||
|
"showIncomingTransactions": true, |
||||||
|
"transactionTime": false |
||||||
|
}, |
||||||
|
"firstTimeFlowType": "create", |
||||||
|
"forgottenPassword": false, |
||||||
|
"frequentRpcListDetail": [], |
||||||
|
"identities": { |
||||||
|
"0x5cfe73b6021e818b776b421b1c4db2474086a7e1": { |
||||||
|
"address": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1", |
||||||
|
"name": "Account 1" |
||||||
|
} |
||||||
|
}, |
||||||
|
"knownMethodData": {}, |
||||||
|
"lostIdentities": {}, |
||||||
|
"metaMetricsId": null, |
||||||
|
"participateInMetaMetrics": false, |
||||||
|
"preferences": { |
||||||
|
"useNativeCurrencyAsPrimaryCurrency": true |
||||||
|
}, |
||||||
|
"selectedAddress": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1", |
||||||
|
"suggestedTokens": {}, |
||||||
|
"tokens": [], |
||||||
|
"useBlockie": false, |
||||||
|
"useNonceField": false, |
||||||
|
"usePhishDetect": true |
||||||
|
}, |
||||||
|
"TransactionController": { |
||||||
|
"transactions": { |
||||||
|
"4046084157914634": { |
||||||
|
"chainId": "0x539", |
||||||
|
"primaryTransaction": { |
||||||
|
"chainId": "0x539", |
||||||
|
"id": 4046084157914634, |
||||||
|
"loadingDefaults": true, |
||||||
|
"metamaskNetworkId": "1337", |
||||||
|
"origin": "metamask", |
||||||
|
"status": "unapproved", |
||||||
|
"time": 1617228030067, |
||||||
|
"txParams": { |
||||||
|
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1", |
||||||
|
"gas": "0x61a8", |
||||||
|
"maxFeePerGas": "0x59682f0c", |
||||||
|
"maxPriorityFeePerGas": "0x59682f00", |
||||||
|
"type": "0x2", |
||||||
|
"to": "0x2f318C334780961FB129D2a6c30D0763d9a5C970", |
||||||
|
"value": "0xde0b6b3a7640000" |
||||||
|
}, |
||||||
|
"type": "sentEther" |
||||||
|
}, |
||||||
|
"history": [ |
||||||
|
{ |
||||||
|
"chainId": "0x539", |
||||||
|
"id": 4046084157914634, |
||||||
|
"loadingDefaults": true, |
||||||
|
"metamaskNetworkId": "1337", |
||||||
|
"origin": "metamask", |
||||||
|
"status": "unapproved", |
||||||
|
"time": 1617228030067, |
||||||
|
"txParams": { |
||||||
|
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1", |
||||||
|
"gas": "0x61a8", |
||||||
|
"maxFeePerGas": "0x59682f0c", |
||||||
|
"maxPriorityFeePerGas": "0x59682f00", |
||||||
|
"type": "0x2", |
||||||
|
"to": "0x2f318C334780961FB129D2a6c30D0763d9a5C970", |
||||||
|
"value": "0xde0b6b3a7640000" |
||||||
|
}, |
||||||
|
"type": "simpleSend" |
||||||
|
}, |
||||||
|
[ |
||||||
|
{ |
||||||
|
"note": "Added new unapproved transaction.", |
||||||
|
"op": "replace", |
||||||
|
"path": "/loadingDefaults", |
||||||
|
"timestamp": 1617228030069, |
||||||
|
"value": false |
||||||
|
} |
||||||
|
] |
||||||
|
], |
||||||
|
"id": 4046084157914634, |
||||||
|
"loadingDefaults": false, |
||||||
|
"metamaskNetworkId": "1337", |
||||||
|
"origin": "metamask", |
||||||
|
"status": "unapproved", |
||||||
|
"time": 1617228030067, |
||||||
|
"txParams": { |
||||||
|
"from": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1", |
||||||
|
"gas": "0x61a8", |
||||||
|
"maxFeePerGas": "0x59682f0c", |
||||||
|
"maxPriorityFeePerGas": "0x59682f00", |
||||||
|
"type": "0x2", |
||||||
|
"to": "0x2f318C334780961FB129D2a6c30D0763d9a5C970", |
||||||
|
"value": "0xde0b6b3a7640000" |
||||||
|
}, |
||||||
|
"type": "simpleSend" |
||||||
|
} |
||||||
|
} |
||||||
|
}, |
||||||
|
"config": {}, |
||||||
|
"firstTimeInfo": { |
||||||
|
"date": 1575697234195, |
||||||
|
"version": "7.7.0" |
||||||
|
} |
||||||
|
}, |
||||||
|
"meta": { |
||||||
|
"version": 40 |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,277 @@ |
|||||||
|
const { strict: assert } = require('assert'); |
||||||
|
const { |
||||||
|
convertToHexValue, |
||||||
|
connectDappWithExtensionPopup, |
||||||
|
getWindowHandles, |
||||||
|
largeDelayMs, |
||||||
|
withFixtures, |
||||||
|
regularDelayMs, |
||||||
|
} = require('../helpers'); |
||||||
|
|
||||||
|
if (process.env.EIP_1559_V2 === '1') { |
||||||
|
describe('Editing Confirm Transaction', function () { |
||||||
|
it('allows selecting high, medium, low gas estimates on edit gas fee popover', async function () { |
||||||
|
const ganacheOptions = { |
||||||
|
hardfork: 'london', |
||||||
|
accounts: [ |
||||||
|
{ |
||||||
|
secretKey: |
||||||
|
'0x7C9529A67102755B7E6102D6D950AC5D5863C98713805CEC576B945B15B71EAC', |
||||||
|
balance: convertToHexValue(25000000000000000000), |
||||||
|
}, |
||||||
|
], |
||||||
|
}; |
||||||
|
await withFixtures( |
||||||
|
{ |
||||||
|
fixtures: 'eip-1559-v2', |
||||||
|
ganacheOptions, |
||||||
|
title: this.test.title, |
||||||
|
}, |
||||||
|
async ({ driver }) => { |
||||||
|
await driver.navigate(); |
||||||
|
|
||||||
|
await driver.fill('#password', 'correct horse battery staple'); |
||||||
|
await driver.press('#password', driver.Key.ENTER); |
||||||
|
|
||||||
|
const transactionAmounts = await driver.findElements( |
||||||
|
'.currency-display-component__text', |
||||||
|
); |
||||||
|
const transactionAmount = transactionAmounts[0]; |
||||||
|
assert.equal(await transactionAmount.getText(), '2.2'); |
||||||
|
|
||||||
|
// update estimates to high
|
||||||
|
await driver.clickElement('[data-testid="edit-gas-fee-button"]'); |
||||||
|
await driver.delay(regularDelayMs); |
||||||
|
await driver.clickElement('[data-testid="edit-gas-fee-item-high"]'); |
||||||
|
await driver.delay(regularDelayMs); |
||||||
|
await driver.waitForSelector({ text: '🦍' }); |
||||||
|
await driver.waitForSelector({ |
||||||
|
text: 'Aggressive', |
||||||
|
}); |
||||||
|
|
||||||
|
// update estimates to medium
|
||||||
|
await driver.clickElement('[data-testid="edit-gas-fee-button"]'); |
||||||
|
await driver.delay(regularDelayMs); |
||||||
|
await driver.clickElement('[data-testid="edit-gas-fee-item-medium"]'); |
||||||
|
await driver.delay(regularDelayMs); |
||||||
|
await driver.waitForSelector({ text: '🦊' }); |
||||||
|
await driver.waitForSelector({ |
||||||
|
text: 'Market', |
||||||
|
}); |
||||||
|
|
||||||
|
// update estimates to low
|
||||||
|
await driver.clickElement('[data-testid="edit-gas-fee-button"]'); |
||||||
|
await driver.delay(regularDelayMs); |
||||||
|
await driver.clickElement('[data-testid="edit-gas-fee-item-low"]'); |
||||||
|
await driver.delay(regularDelayMs); |
||||||
|
await driver.waitForSelector({ text: '🐢' }); |
||||||
|
await driver.waitForSelector({ |
||||||
|
text: 'Low', |
||||||
|
}); |
||||||
|
await driver.waitForSelector('[data-testid="low-gas-fee-alert"]'); |
||||||
|
|
||||||
|
// confirms the transaction
|
||||||
|
await driver.clickElement({ text: 'Confirm', tag: 'button' }); |
||||||
|
await driver.delay(regularDelayMs); |
||||||
|
|
||||||
|
await driver.clickElement('[data-testid="home__activity-tab"]'); |
||||||
|
await driver.wait(async () => { |
||||||
|
const confirmedTxes = await driver.findElements( |
||||||
|
'.transaction-list__completed-transactions .transaction-list-item', |
||||||
|
); |
||||||
|
return confirmedTxes.length === 1; |
||||||
|
}, 10000); |
||||||
|
|
||||||
|
const txValues = await driver.findElements( |
||||||
|
'.transaction-list-item__primary-currency', |
||||||
|
); |
||||||
|
assert.equal(txValues.length, 1); |
||||||
|
assert.ok(/-2.2\s*ETH/u.test(await txValues[0].getText())); |
||||||
|
}, |
||||||
|
); |
||||||
|
}); |
||||||
|
|
||||||
|
it('allows accessing advance gas fee popover from edit gas fee popover', async function () { |
||||||
|
const ganacheOptions = { |
||||||
|
hardfork: 'london', |
||||||
|
accounts: [ |
||||||
|
{ |
||||||
|
secretKey: |
||||||
|
'0x7C9529A67102755B7E6102D6D950AC5D5863C98713805CEC576B945B15B71EAC', |
||||||
|
balance: convertToHexValue(25000000000000000000), |
||||||
|
}, |
||||||
|
], |
||||||
|
}; |
||||||
|
await withFixtures( |
||||||
|
{ |
||||||
|
fixtures: 'eip-1559-v2', |
||||||
|
ganacheOptions, |
||||||
|
title: this.test.title, |
||||||
|
}, |
||||||
|
async ({ driver }) => { |
||||||
|
await driver.navigate(); |
||||||
|
|
||||||
|
await driver.fill('#password', 'correct horse battery staple'); |
||||||
|
await driver.press('#password', driver.Key.ENTER); |
||||||
|
|
||||||
|
const transactionAmounts = await driver.findElements( |
||||||
|
'.currency-display-component__text', |
||||||
|
); |
||||||
|
const transactionAmount = transactionAmounts[0]; |
||||||
|
assert.equal(await transactionAmount.getText(), '2.2'); |
||||||
|
|
||||||
|
// update estimates to high
|
||||||
|
await driver.clickElement('[data-testid="edit-gas-fee-button"]'); |
||||||
|
await driver.delay(regularDelayMs); |
||||||
|
await driver.clickElement('[data-testid="edit-gas-fee-item-custom"]'); |
||||||
|
await driver.delay(regularDelayMs); |
||||||
|
|
||||||
|
// enter max fee
|
||||||
|
const maxBaseFee = await driver.findElement( |
||||||
|
'[data-testid="base-fee-input"]', |
||||||
|
); |
||||||
|
await maxBaseFee.clear(); |
||||||
|
await maxBaseFee.sendKeys('8'); |
||||||
|
await driver.delay(regularDelayMs); |
||||||
|
|
||||||
|
// enter priority fee
|
||||||
|
const priorityFee = await driver.findElement( |
||||||
|
'[data-testid="priority-fee-input"]', |
||||||
|
); |
||||||
|
await priorityFee.clear(); |
||||||
|
await priorityFee.sendKeys('8'); |
||||||
|
await driver.delay(regularDelayMs); |
||||||
|
|
||||||
|
// save default values
|
||||||
|
await driver.clickElement('input[type="checkbox"]'); |
||||||
|
await driver.delay(regularDelayMs); |
||||||
|
|
||||||
|
// edit gas limit
|
||||||
|
await driver.clickElement('[data-testid="advanced-gas-fee-edit"]'); |
||||||
|
await driver.delay(regularDelayMs); |
||||||
|
const gasLimit = await driver.findElement( |
||||||
|
'[data-testid="gas-limit-input"]', |
||||||
|
); |
||||||
|
await gasLimit.clear(); |
||||||
|
await gasLimit.sendKeys('100000'); |
||||||
|
await driver.delay(regularDelayMs); |
||||||
|
|
||||||
|
// Submit gas fee changes
|
||||||
|
await driver.clickElement({ text: 'Save', tag: 'button' }); |
||||||
|
|
||||||
|
// has correct updated value on the confirm screen the transaction
|
||||||
|
const editedTransactionAmounts = await driver.findElements( |
||||||
|
'.transaction-detail-item__row .transaction-detail-item__detail-values .currency-display-component__text:last-of-type', |
||||||
|
); |
||||||
|
const editedTransactionAmount = editedTransactionAmounts[0]; |
||||||
|
assert.equal(await editedTransactionAmount.getText(), '0.0008'); |
||||||
|
|
||||||
|
const editedTransactionFee = editedTransactionAmounts[1]; |
||||||
|
assert.equal(await editedTransactionFee.getText(), '2.2008'); |
||||||
|
|
||||||
|
// confirms the transaction
|
||||||
|
await driver.clickElement({ text: 'Confirm', tag: 'button' }); |
||||||
|
await driver.delay(regularDelayMs); |
||||||
|
|
||||||
|
await driver.clickElement('[data-testid="home__activity-tab"]'); |
||||||
|
await driver.wait(async () => { |
||||||
|
const confirmedTxes = await driver.findElements( |
||||||
|
'.transaction-list__completed-transactions .transaction-list-item', |
||||||
|
); |
||||||
|
return confirmedTxes.length === 1; |
||||||
|
}, 10000); |
||||||
|
|
||||||
|
const txValues = await driver.findElements( |
||||||
|
'.transaction-list-item__primary-currency', |
||||||
|
); |
||||||
|
assert.equal(txValues.length, 1); |
||||||
|
assert.ok(/-2.2\s*ETH/u.test(await txValues[0].getText())); |
||||||
|
}, |
||||||
|
); |
||||||
|
}); |
||||||
|
|
||||||
|
it('should use dapp suggested estimates for transaction coming from dapp', async function () { |
||||||
|
const ganacheOptions = { |
||||||
|
hardfork: 'london', |
||||||
|
accounts: [ |
||||||
|
{ |
||||||
|
secretKey: |
||||||
|
'0x7C9529A67102755B7E6102D6D950AC5D5863C98713805CEC576B945B15B71EAC', |
||||||
|
balance: convertToHexValue(25000000000000000000), |
||||||
|
}, |
||||||
|
], |
||||||
|
}; |
||||||
|
await withFixtures( |
||||||
|
{ |
||||||
|
fixtures: 'eip-1559-v2-dapp', |
||||||
|
ganacheOptions, |
||||||
|
title: this.test.title, |
||||||
|
dapp: true, |
||||||
|
}, |
||||||
|
async ({ driver }) => { |
||||||
|
await driver.navigate(); |
||||||
|
|
||||||
|
// login to extension
|
||||||
|
await driver.fill('#password', 'correct horse battery staple'); |
||||||
|
await driver.press('#password', driver.Key.ENTER); |
||||||
|
|
||||||
|
// open dapp and connect
|
||||||
|
await connectDappWithExtensionPopup(driver); |
||||||
|
await driver.clickElement({ text: 'Send', tag: 'button' }); |
||||||
|
|
||||||
|
// check transaction in extension popup
|
||||||
|
const windowHandles = await getWindowHandles(driver, 3); |
||||||
|
await driver.switchToWindow(windowHandles.popup); |
||||||
|
await driver.delay(largeDelayMs); |
||||||
|
await driver.waitForSelector({ text: '🌐' }); |
||||||
|
await driver.waitForSelector({ |
||||||
|
text: 'Site suggested', |
||||||
|
}); |
||||||
|
|
||||||
|
await driver.clickElement('[data-testid="edit-gas-fee-button"]'); |
||||||
|
await driver.delay(regularDelayMs); |
||||||
|
await driver.clickElement( |
||||||
|
'[data-testid="edit-gas-fee-item-dappSuggested"]', |
||||||
|
); |
||||||
|
await driver.delay(regularDelayMs); |
||||||
|
|
||||||
|
const transactionAmounts = await driver.findElements( |
||||||
|
'.currency-display-component__text', |
||||||
|
); |
||||||
|
const transactionAmount = transactionAmounts[0]; |
||||||
|
assert.equal(await transactionAmount.getText(), '3'); |
||||||
|
|
||||||
|
// has correct updated value on the confirm screen the transaction
|
||||||
|
const editedTransactionAmounts = await driver.findElements( |
||||||
|
'.transaction-detail-item__row .transaction-detail-item__detail-values .currency-display-component__text:last-of-type', |
||||||
|
); |
||||||
|
const editedTransactionAmount = editedTransactionAmounts[0]; |
||||||
|
assert.equal(await editedTransactionAmount.getText(), '0.00042'); |
||||||
|
|
||||||
|
const editedTransactionFee = editedTransactionAmounts[1]; |
||||||
|
assert.equal(await editedTransactionFee.getText(), '3.00042'); |
||||||
|
|
||||||
|
// confirms the transaction
|
||||||
|
await driver.clickElement({ text: 'Confirm', tag: 'button' }); |
||||||
|
await driver.delay(regularDelayMs); |
||||||
|
|
||||||
|
// transaction should correct values in activity tab
|
||||||
|
await driver.switchToWindow(windowHandles.extension); |
||||||
|
await driver.clickElement('[data-testid="home__activity-tab"]'); |
||||||
|
await driver.wait(async () => { |
||||||
|
const confirmedTxes = await driver.findElements( |
||||||
|
'.transaction-list__completed-transactions .transaction-list-item', |
||||||
|
); |
||||||
|
return confirmedTxes.length === 1; |
||||||
|
}, 10000); |
||||||
|
|
||||||
|
const txValues = await driver.findElements( |
||||||
|
'.transaction-list-item__primary-currency', |
||||||
|
); |
||||||
|
assert.equal(txValues.length, 1); |
||||||
|
assert.ok(/-3\s*ETH/u.test(await txValues[0].getText())); |
||||||
|
}, |
||||||
|
); |
||||||
|
}); |
||||||
|
}); |
||||||
|
} |
@ -0,0 +1,48 @@ |
|||||||
|
import React from 'react'; |
||||||
|
import PropTypes from 'prop-types'; |
||||||
|
|
||||||
|
import { useI18nContext } from '../../../hooks/useI18nContext'; |
||||||
|
import { |
||||||
|
KEYRING_NAMES, |
||||||
|
KEYRING_TYPES, |
||||||
|
} from '../../../../shared/constants/hardware-wallets'; |
||||||
|
|
||||||
|
export default function KeyRingLabel({ keyring }) { |
||||||
|
const t = useI18nContext(); |
||||||
|
|
||||||
|
let label = null; |
||||||
|
|
||||||
|
// Keyring value might take a while to get a value
|
||||||
|
if (!keyring) { |
||||||
|
return null; |
||||||
|
} |
||||||
|
const { type } = keyring; |
||||||
|
|
||||||
|
switch (type) { |
||||||
|
case KEYRING_TYPES.QR: |
||||||
|
label = KEYRING_NAMES.QR; |
||||||
|
break; |
||||||
|
case 'Simple Key Pair': |
||||||
|
label = t('imported'); |
||||||
|
break; |
||||||
|
case KEYRING_TYPES.TREZOR: |
||||||
|
label = KEYRING_NAMES.TREZOR; |
||||||
|
break; |
||||||
|
case KEYRING_TYPES.LEDGER: |
||||||
|
label = KEYRING_NAMES.LEDGER; |
||||||
|
break; |
||||||
|
case KEYRING_TYPES.LATTICE: |
||||||
|
label = KEYRING_NAMES.LATTICE; |
||||||
|
break; |
||||||
|
default: |
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
return ( |
||||||
|
<>{label ? <div className="keyring-label allcaps">{label}</div> : null}</> |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
KeyRingLabel.propTypes = { |
||||||
|
keyring: PropTypes.object, |
||||||
|
}; |
@ -0,0 +1,94 @@ |
|||||||
|
import React from 'react'; |
||||||
|
import PropTypes from 'prop-types'; |
||||||
|
import { useHistory } from 'react-router-dom'; |
||||||
|
import { useSelector } from 'react-redux'; |
||||||
|
|
||||||
|
import Box from '../../../ui/box'; |
||||||
|
import Dialog from '../../../ui/dialog'; |
||||||
|
import Typography from '../../../ui/typography/typography'; |
||||||
|
import { |
||||||
|
COLORS, |
||||||
|
TYPOGRAPHY, |
||||||
|
TEXT_ALIGN, |
||||||
|
FONT_WEIGHT, |
||||||
|
DISPLAY, |
||||||
|
} from '../../../../helpers/constants/design-system'; |
||||||
|
import { useI18nContext } from '../../../../hooks/useI18nContext'; |
||||||
|
import Button from '../../../ui/button'; |
||||||
|
import { EXPERIMENTAL_ROUTE } from '../../../../helpers/constants/routes'; |
||||||
|
import { setEnableEIP1559V2NoticeDismissed } from '../../../../store/actions'; |
||||||
|
import { getEnableEIP1559V2NoticeDismissed } from '../../../../ducks/metamask/metamask'; |
||||||
|
import { getEIP1559V2Enabled } from '../../../../selectors'; |
||||||
|
|
||||||
|
const EIP_1559_V2_ENABLED = |
||||||
|
// This is a string in unit tests but is a boolean in the browser
|
||||||
|
process.env.EIP_1559_V2 === true || process.env.EIP_1559_V2 === 'true'; |
||||||
|
|
||||||
|
export default function EnableEIP1559V2Notice({ isFirstAlert }) { |
||||||
|
const t = useI18nContext(); |
||||||
|
const history = useHistory(); |
||||||
|
const enableEIP1559V2NoticeDismissed = useSelector( |
||||||
|
getEnableEIP1559V2NoticeDismissed, |
||||||
|
); |
||||||
|
const eip1559V2Enabled = useSelector(getEIP1559V2Enabled); |
||||||
|
|
||||||
|
if ( |
||||||
|
!EIP_1559_V2_ENABLED || |
||||||
|
eip1559V2Enabled || |
||||||
|
enableEIP1559V2NoticeDismissed |
||||||
|
) { |
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
return ( |
||||||
|
<Box |
||||||
|
margin={[0, 4, 4, 4]} |
||||||
|
marginTop={isFirstAlert ? 4 : 0} |
||||||
|
className="enableEIP1559V2-notice" |
||||||
|
> |
||||||
|
<Dialog type="message" className="enableEIP1559V2-notice__dialog"> |
||||||
|
<button |
||||||
|
onClick={setEnableEIP1559V2NoticeDismissed} |
||||||
|
className="enableEIP1559V2-notice__close-button" |
||||||
|
data-testid="enableEIP1559V2-notice-close" |
||||||
|
/> |
||||||
|
<Box display={DISPLAY.FLEX}> |
||||||
|
<Box paddingTop={2}> |
||||||
|
<i style={{ fontSize: '1rem' }} className="fa fa-info-circle" /> |
||||||
|
</Box> |
||||||
|
<Box paddingLeft={4}> |
||||||
|
<Typography |
||||||
|
color={COLORS.BLACK} |
||||||
|
align={TEXT_ALIGN.LEFT} |
||||||
|
variant={TYPOGRAPHY.H7} |
||||||
|
fontWeight={FONT_WEIGHT.BOLD} |
||||||
|
> |
||||||
|
{t('enableEIP1559V2Header')} |
||||||
|
</Typography> |
||||||
|
<Typography |
||||||
|
color={COLORS.BLACK} |
||||||
|
align={TEXT_ALIGN.LEFT} |
||||||
|
variant={TYPOGRAPHY.H7} |
||||||
|
boxProps={{ marginBottom: 2 }} |
||||||
|
> |
||||||
|
{t('enableEIP1559V2AlertMessage')} |
||||||
|
</Typography> |
||||||
|
<Button |
||||||
|
type="link" |
||||||
|
onClick={() => { |
||||||
|
history.push(EXPERIMENTAL_ROUTE); |
||||||
|
}} |
||||||
|
className="enableEIP1559V2-notice__link" |
||||||
|
> |
||||||
|
{t('enableEIP1559V2ButtonText')} |
||||||
|
</Button> |
||||||
|
</Box> |
||||||
|
</Box> |
||||||
|
</Dialog> |
||||||
|
</Box> |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
EnableEIP1559V2Notice.propTypes = { |
||||||
|
isFirstAlert: PropTypes.bool, |
||||||
|
}; |
@ -0,0 +1 @@ |
|||||||
|
export { default } from './enableEIP1559V2-notice'; |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue