Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
f9aa5a7
Adds new gas customization modal container (without content)
danjm Jul 31, 2018
88d8eb2
Use correct message key in gas-modal-page-container.component.js
danjm Aug 6, 2018
5e74094
Use BEM for css in gas-modal-page-container
danjm Aug 6, 2018
342dc95
Adds the content of the advanced tab - w/o chart or dynamic content -…
danjm Aug 2, 2018
d55a261
Split advanced-tab-content.component.js render() method into smaller…
danjm Aug 7, 2018
3b9ec8e
Remove gas slider from advance-tab-content.component
danjm Aug 7, 2018
99c8804
Add tests for advanced-tab-component.js and subcomponents.
danjm Aug 8, 2018
57cd721
Improve styling of advanced-tab-content gasInput row
danjm Aug 8, 2018
112d18e
Adds basic tab content to gas customizer, with styled button group (s…
danjm Aug 9, 2018
0a7dfcd
Connect the gas-button-group component to redux and a live api.
danjm Aug 16, 2018
d07d40c
Improvements to propdefaults in button-group.component and basic-tab-…
danjm Sep 9, 2018
58feb24
Styling fixes for gas customization advanced tab content.
danjm Sep 9, 2018
6ada9b4
Adds gas-duck.test.js tests.
danjm Sep 9, 2018
7de3f22
Connects remained of the gas customization component to redux.
danjm Sep 13, 2018
b567c78
Integrate gas buttons with the send screen.
danjm Sep 13, 2018
5354325
Test updates and additions for button integration with send screen.
danjm Sep 20, 2018
b95eb30
Adds redesign for the customize gas advanced tab.
danjm Sep 20, 2018
6f8e2b1
Clean up for advanced gas tab customization changes.
danjm Oct 9, 2018
6dd1028
Lint and unit test fixes.
danjm Oct 10, 2018
0ba6f7d
Adds not yet functional gas price chart.
danjm Sep 20, 2018
2dbae58
Gas price chart improvements, redesign, bug fixes, and set up to rece…
danjm Oct 3, 2018
a2bbf50
Read only connection of gas price chart to redux
danjm Oct 9, 2018
cd32c58
Complete integration of gas chart with redux.
danjm Oct 10, 2018
aa798cc
Add control arrows to advanced gas tab inputs.
danjm Oct 10, 2018
6f04061
Clean up gas chart code.
danjm Oct 23, 2018
d0619b0
Update tests, plus some lint fixes, for gas-price-chart
danjm Oct 23, 2018
d14af83
Improve data management and tests for gas-modal-page-container price …
danjm Oct 24, 2018
3ced3c9
Clean up for mmui-i11-custom-gas-price-chart branch
danjm Oct 25, 2018
3162a27
Redesign of gas customization basic tab.
danjm Oct 25, 2018
9b9a2cc
Adds createSpeedUpTransaction to txController
danjm Oct 26, 2018
e3f015c
Adds speed up slide-in gas customization sidebar
danjm Oct 26, 2018
79de7a4
Connect gas price chart to gas station api.
danjm Oct 24, 2018
a8259f7
Update e2e tests for new gas customization modal.
danjm Nov 5, 2018
b70886a
Fixes for components that break e2e gas customization tests, plus uni…
danjm Nov 5, 2018
8c8359c
Remove gas customization integration tests (in favour of e2e tests)
danjm Nov 6, 2018
b7f873b
Add gas data to integration test json data set.
danjm Nov 7, 2018
a44596e
Add c3 and d3 to the separate dependencies bundle.
danjm Nov 8, 2018
d5411e7
Make gas customization modal responsive.
danjm Nov 8, 2018
4111e9f
Improve responsiveness of customize speed up slider.
danjm Nov 15, 2018
fe53515
Fix "fastest" translation message; change to sentence case
danjm Nov 13, 2018
7f2c5c0
Uses more reliable api on main send screen; caches basic api results …
danjm Nov 13, 2018
7ffea92
Add loading spinners when waiting for APIs in the gas customization m…
danjm Nov 13, 2018
f8ffdae
Modify results of API data to better fit gas chart: remove outliers, …
danjm Nov 13, 2018
75d7545
Clear custom gas data on hiding of gas customization modal.
danjm Nov 13, 2018
d8e41a6
Final gas customization fixes
danjm Nov 27, 2018
8194309
Fix styling of send screen in extension view when hex data on.
danjm Dec 3, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions app/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@
"address": {
"message": "Address"
},
"advancedOptions": {
"message": "Advanced Options"
},
"addCustomToken": {
"message": "Add custom token"
},
Expand All @@ -80,12 +83,18 @@
"addAcquiredTokens": {
"message": "Add the tokens you've acquired using MetaMask"
},
"advanced": {
"message": "Advanced"
},
"amount": {
"message": "Amount"
},
"amountPlusGas": {
"message": "Amount + Gas"
},
"amountPlusTxFee": {
"message": "Amount + TX Fee"
},
"appDescription": {
"message": "Ethereum Browser Extension",
"description": "The description of the application"
Expand Down Expand Up @@ -115,6 +124,9 @@
"available": {
"message": "Available"
},
"average": {
"message": "Average"
},
"back": {
"message": "Back"
},
Expand All @@ -127,6 +139,9 @@
"balanceIsInsufficientGas": {
"message": "Insufficient balance for current gas total"
},
"basic": {
"message": "Basic"
},
"beta": {
"message": "BETA"
},
Expand Down Expand Up @@ -303,6 +318,9 @@
"customGas": {
"message": "Customize Gas"
},
"customGasSubTitle": {
"message": "Increasing fee may decrease processing times, but it is not guaranteed."
},
"customToken": {
"message": "Custom Token"
},
Expand Down Expand Up @@ -427,6 +445,15 @@
"failed": {
"message": "Failed"
},
"fast": {
"message": "Fast"
},
"fastest": {
"message": "Fastest"
},
"feeChartTitle": {
"message": "Live Transaction Fee Predictions"
},
"fiat": {
"message": "Fiat",
"description": "Exchange type"
Expand Down Expand Up @@ -481,6 +508,9 @@
"gasPrice": {
"message": "Gas Price (GWEI)"
},
"gasPriceNoDenom": {
"message": "Gas Price"
},
"gasPriceCalculation": {
"message": "We calculate the suggested gas prices based on network success rates."
},
Expand Down Expand Up @@ -689,6 +719,9 @@
"missingYourTokens": {
"message": "Don't see your tokens?"
},
"minutesShorthand": {
"message": "Min"
},
"myAccounts": {
"message": "My Accounts"
},
Expand Down Expand Up @@ -755,6 +788,12 @@
"optionalNickname": {
"message": "Nickname (optional)"
},
"newTotal": {
"message": "New Total"
},
"newTransactionFee": {
"message": "New Transaction Fee"
},
"next": {
"message": "Next"
},
Expand Down Expand Up @@ -820,6 +859,9 @@
"parameters": {
"message": "Parameters"
},
"originalTotal": {
"message": "Original Total"
},
"password": {
"message": "Password"
},
Expand Down Expand Up @@ -993,6 +1035,9 @@
"save": {
"message": "Save"
},
"slow": {
"message": "Slow"
},
"saveAsCsvFile": {
"message": "Save as CSV File"
},
Expand All @@ -1018,6 +1063,9 @@
"secretPhrase": {
"message": "Enter your secret twelve word phrase here to restore your vault."
},
"secondsShorthand": {
"message": "Sec"
},
"seedPhraseReq": {
"message": "Seed phrases are 12 words long"
},
Expand All @@ -1039,6 +1087,9 @@
"send": {
"message": "Send"
},
"sendAmount": {
"message": "Send Amount"
},
"sendETH": {
"message": "Send ETH"
},
Expand Down Expand Up @@ -1244,12 +1295,18 @@
"transactionErrorNoContract": {
"message": "Trying to call a function on a non-contract address."
},
"transactionFee": {
"message": "Transaction Fee"
},
"transactionMemo": {
"message": "Transaction memo (optional)"
},
"transactionNumber": {
"message": "Transaction Number"
},
"transactionTime": {
"message": "Transaction Time"
},
"transfer": {
"message": "Transfer"
},
Expand Down
23 changes: 23 additions & 0 deletions app/scripts/controllers/transactions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,29 @@ class TransactionController extends EventEmitter {
return newTxMeta
}

async createSpeedUpTransaction (originalTxId, customGasPrice) {
const originalTxMeta = this.txStateManager.getTx(originalTxId)
const { txParams } = originalTxMeta
const { gasPrice: lastGasPrice } = txParams

const newGasPrice = customGasPrice || bnToHex(BnMultiplyByFraction(hexToBn(lastGasPrice), 11, 10))

const newTxMeta = this.txStateManager.generateTxMeta({
txParams: {
...txParams,
gasPrice: newGasPrice,
},
lastGasPrice,
loadingDefaults: false,
status: TRANSACTION_STATUS_APPROVED,
type: TRANSACTION_TYPE_RETRY,
})

this.addTx(newTxMeta)
await this.approveTransaction(newTxMeta.id)
return newTxMeta
}

/**
updates the txMeta in the txStateManager
@param txMeta {Object} - the updated txMeta
Expand Down
7 changes: 7 additions & 0 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ module.exports = class MetamaskController extends EventEmitter {
updateAndApproveTransaction: nodeify(txController.updateAndApproveTransaction, txController),
retryTransaction: nodeify(this.retryTransaction, this),
createCancelTransaction: nodeify(this.createCancelTransaction, this),
createSpeedUpTransaction: nodeify(this.createSpeedUpTransaction, this),
getFilteredTxList: nodeify(txController.getFilteredTxList, txController),
isNonceTaken: nodeify(txController.isNonceTaken, txController),
estimateGas: nodeify(this.estimateGas, this),
Expand Down Expand Up @@ -1162,6 +1163,12 @@ module.exports = class MetamaskController extends EventEmitter {
return state
}

async createSpeedUpTransaction (originalTxId, customGasPrice, cb) {
await this.txController.createSpeedUpTransaction(originalTxId, customGasPrice)
const state = await this.getState()
return state
}

estimateGas (estimateGasParams) {
return new Promise((resolve, reject) => {
return this.txController.txGasUtil.query.estimateGas(estimateGasParams, (err, res) => {
Expand Down
Loading