Skip to content

Commit

Permalink
Merge pull request #4691 from MetaMask/i4404-confirm-refactor
Browse files Browse the repository at this point in the history
Refactor and redesign confirm transaction views
  • Loading branch information
alextsg authored Jul 12, 2018
2 parents 4521de1 + 6701771 commit 0d4dbbe
Show file tree
Hide file tree
Showing 125 changed files with 5,145 additions and 775 deletions.
24 changes: 24 additions & 0 deletions app/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
"message": "MetaMask",
"description": "The name of the application"
},
"approve": {
"message": "Approve"
},
"approved": {
"message": "Approved"
},
Expand Down Expand Up @@ -89,6 +92,9 @@
"buyCoinbaseExplainer": {
"message": "Coinbase is the world’s most popular way to buy and sell bitcoin, ethereum, and litecoin."
},
"bytes": {
"message": "Bytes"
},
"ok": {
"message": "Ok"
},
Expand Down Expand Up @@ -149,6 +155,9 @@
"copyContractAddress": {
"message": "Copy Contract Address"
},
"copyAddress": {
"message": "Copy address to clipboard"
},
"copyToClipboard": {
"message": "Copy to clipboard"
},
Expand Down Expand Up @@ -277,6 +286,9 @@
"enterPasswordContinue": {
"message": "Enter password to continue"
},
"parameters": {
"message": "Parameters"
},
"passwordNotLongEnough": {
"message": "Password not long enough"
},
Expand Down Expand Up @@ -318,6 +330,9 @@
"fromShapeShift": {
"message": "From ShapeShift"
},
"functionType": {
"message": "Function Type"
},
"gas": {
"message": "Gas",
"description": "Short indication of gas cost"
Expand Down Expand Up @@ -370,6 +385,9 @@
"hereList": {
"message": "Here's a list!!!!"
},
"hexData": {
"message": "Hex Data"
},
"hide": {
"message": "Hide"
},
Expand Down Expand Up @@ -582,6 +600,9 @@
"message": "or",
"description": "choice between creating or importing a new account"
},
"origin": {
"message": "Origin"
},
"password": {
"message": "Password"
},
Expand Down Expand Up @@ -911,6 +932,9 @@
"transactionNumber": {
"message": "Transaction Number"
},
"transfer": {
"message": "Transfer"
},
"transfers": {
"message": "Transfers"
},
Expand Down
14 changes: 14 additions & 0 deletions app/images/alert-red.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions app/images/alert.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions app/images/caret-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion app/scripts/controllers/network/enums.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const KOVAN = 'kovan'
const MAINNET = 'mainnet'
const LOCALHOST = 'localhost'

const MAINNET_CODE = 1
const ROPSTEN_CODE = 3
const RINKEYBY_CODE = 4
const KOVAN_CODE = 42
Expand All @@ -13,13 +14,13 @@ const RINKEBY_DISPLAY_NAME = 'Rinkeby'
const KOVAN_DISPLAY_NAME = 'Kovan'
const MAINNET_DISPLAY_NAME = 'Main Ethereum Network'


module.exports = {
ROPSTEN,
RINKEBY,
KOVAN,
MAINNET,
LOCALHOST,
MAINNET_CODE,
ROPSTEN_CODE,
RINKEYBY_CODE,
KOVAN_CODE,
Expand Down
2 changes: 1 addition & 1 deletion development/backGroundConnectionModifiers.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
signPersonalMessage: (msgData, cb) => {
const stateUpdate = {
unapprovedPersonalMsgs: {},
unapprovedPersonalMsgsCount: 0,
unapprovedPersonalMsgCount: 0,
}
return cb(null, stateUpdate)
},
Expand Down
18 changes: 18 additions & 0 deletions development/states/confirm-new-ui.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,23 @@
"fromDropdownOpen": false,
"toDropdownOpen": false,
"errors": {}
},
"confirmTransaction": {
"txData": {},
"tokenData": {},
"methodData": {},
"tokenProps": {
"tokenDecimals": "",
"tokenSymbol": ""
},
"fiatTransactionAmount": "",
"fiatTransactionFee": "",
"fiatTransactionTotal": "",
"ethTransactionAmount": "",
"ethTransactionFee": "",
"ethTransactionTotal": "",
"hexGasTotal": "",
"nonce": "",
"fetchingMethodData": false
}
}
37 changes: 32 additions & 5 deletions development/states/confirm-sig-requests.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"from": "0x0d0c7188d9c72b019a5da9bca0d127680c22e658"
},
"status": "unapproved",
"time": 1537889069339,
"time": 1537889070000,
"type": "eth_sign"
}
},
Expand All @@ -86,11 +86,11 @@
"from": "0x0d0c7188d9c72b019a5da9bca0d127680c22e659"
},
"status": "unapproved",
"time": 1517889069339,
"time": 1537889065000,
"type": "personal_sign"
}
},
"unapprovedPersonalMsgCount": 0,
"unapprovedPersonalMsgCount": 1 ,
"unapprovedTypedMessages": {
"8997167822566869": {
"id": 8997167822566869,
Expand All @@ -102,7 +102,7 @@
"from": "0x0d0c7188d9c72b019a5da9bca0d127680c22e659"
},
"status": "unapproved",
"time": 1617889069339,
"time": 1537889060000,
"type": "eth_signTypedData"
}
},
Expand Down Expand Up @@ -172,5 +172,32 @@
"scrollToBottom": false,
"forgottenPassword": null
},
"identities": {}
"identities": {},
"confirmTransaction": {
"txData": {
"id": 8927167822566864,
"msgParams": {
"data": "0x879a053d4800c6354e76c7985a865d2922c82fb5b3f4577b2fe08b998954f2e0",
"from": "0x0d0c7188d9c72b019a5da9bca0d127680c22e658"
},
"status": "unapproved",
"time": 1537889069339,
"type": "eth_sign"
},
"tokenData": {},
"methodData": {},
"tokenProps": {
"tokenDecimals": "",
"tokenSymbol": ""
},
"fiatTransactionAmount": "",
"fiatTransactionFee": "",
"fiatTransactionTotal": "",
"ethTransactionAmount": "",
"ethTransactionFee": "",
"ethTransactionTotal": "",
"hexGasTotal": "",
"nonce": "",
"fetchingMethodData": false
}
}
20 changes: 19 additions & 1 deletion development/states/currency-localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,23 @@
"scrollToBottom": false,
"forgottenPassword": null
},
"identities": {}
"identities": {},
"confirmTransaction": {
"txData": {},
"tokenData": {},
"methodData": {},
"tokenProps": {
"tokenDecimals": "",
"tokenSymbol": ""
},
"fiatTransactionAmount": "",
"fiatTransactionFee": "",
"fiatTransactionTotal": "",
"ethTransactionAmount": "",
"ethTransactionFee": "",
"ethTransactionTotal": "",
"hexGasTotal": "",
"nonce": "",
"fetchingMethodData": false
}
}
20 changes: 19 additions & 1 deletion development/states/first-time.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,23 @@
}
},
"identities": {},
"computedBalances": {}
"computedBalances": {},
"confirmTransaction": {
"txData": {},
"tokenData": {},
"methodData": {},
"tokenProps": {
"tokenDecimals": "",
"tokenSymbol": ""
},
"fiatTransactionAmount": "",
"fiatTransactionFee": "",
"fiatTransactionTotal": "",
"ethTransactionAmount": "",
"ethTransactionFee": "",
"ethTransactionTotal": "",
"hexGasTotal": "",
"nonce": "",
"fetchingMethodData": false
}
}
18 changes: 18 additions & 0 deletions development/states/send-edit.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,23 @@
"fromDropdownOpen": false,
"toDropdownOpen": false,
"errors": {}
},
"confirmTransaction": {
"txData": {},
"tokenData": {},
"methodData": {},
"tokenProps": {
"tokenDecimals": "",
"tokenSymbol": ""
},
"fiatTransactionAmount": "",
"fiatTransactionFee": "",
"fiatTransactionTotal": "",
"ethTransactionAmount": "",
"ethTransactionFee": "",
"ethTransactionTotal": "",
"hexGasTotal": "",
"nonce": "",
"fetchingMethodData": false
}
}
18 changes: 18 additions & 0 deletions development/states/send-new-ui.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,23 @@
"fromDropdownOpen": false,
"toDropdownOpen": false,
"errors": {}
},
"confirmTransaction": {
"txData": {},
"tokenData": {},
"methodData": {},
"tokenProps": {
"tokenDecimals": "",
"tokenSymbol": ""
},
"fiatTransactionAmount": "",
"fiatTransactionFee": "",
"fiatTransactionTotal": "",
"ethTransactionAmount": "",
"ethTransactionFee": "",
"ethTransactionTotal": "",
"hexGasTotal": "",
"nonce": "",
"fetchingMethodData": false
}
}
Loading

0 comments on commit 0d4dbbe

Please sign in to comment.