1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/test/data/mock-pending-transaction-data.json
Alex Donesky 74fa6fa187
Fix gas api overcalling (#12069)
* Move gasEstimation calls onto edit-gas-popover instead of transaction list item

* delete useCancelTransaction and useRetryTransaction hooks
consolidate gasFee calls into cancel button component.

* add tests

* update component name

* addressing feedback

* fix failing e2e test

* followup fix e2e tests

* change useIncrementedGasFees to accept single transaction rather than transactionGroup as argument

* remove unnecessary change to fixture

* only ever pass primary transaction to useIncrementedGasFees

* remove unnecessary optional chaining
2021-09-15 10:59:51 -05:00

235 lines
6.3 KiB
JSON

{
"hasCancelled": false,
"hasRetried": false,
"initialTransaction": {
"id": 6854191329910881,
"time": 1631558469046,
"status": "approved",
"metamaskNetworkId": "42",
"chainId": "0x2a",
"loadingDefaults": false,
"dappSuggestedGasFees": null,
"txParams": {
"from": "0x0853dccd30e0582df80b16ec014092160b48e797",
"to": "0x8d09d17af2e20f51a9b598cb9edd01489a26ae27",
"value": "0x38d7ea4c68000",
"gas": "0x5208",
"maxFeePerGas": "0x47868c00",
"maxPriorityFeePerGas": "0x47868c00",
"type": "0x2"
},
"origin": "metamask",
"type": "sentEther",
"history": [
{
"id": 6854191329910881,
"time": 1631558469046,
"status": "unapproved",
"metamaskNetworkId": "42",
"chainId": "0x2a",
"loadingDefaults": true,
"dappSuggestedGasFees": null,
"txParams": {
"from": "0x0853dccd30e0582df80b16ec014092160b48e797",
"to": "0x8d09d17af2e20f51a9b598cb9edd01489a26ae27",
"value": "0x38d7ea4c68000",
"gas": "0x5208",
"maxFeePerGas": "0x47868c00",
"maxPriorityFeePerGas": "0x47868c00",
"type": "0x2"
},
"origin": "metamask",
"type": "sentEther"
},
[
{
"op": "replace",
"path": "/loadingDefaults",
"value": false,
"note": "Added new unapproved transaction.",
"timestamp": 1631558469059
},
{
"op": "add",
"path": "/userFeeLevel",
"value": "medium"
}
],
[
{
"op": "add",
"path": "/estimatedBaseFee",
"value": "0",
"note": "confTx: user approved transaction",
"timestamp": 1631558472917
}
],
[
{
"op": "replace",
"path": "/status",
"value": "approved",
"note": "txStateManager: setting status to approved",
"timestamp": 1631558472925
}
]
],
"userFeeLevel": "medium",
"estimatedBaseFee": "0"
},
"primaryTransaction": {
"id": 6854191329910881,
"time": 1631558469046,
"status": "approved",
"metamaskNetworkId": "42",
"chainId": "0x2a",
"loadingDefaults": false,
"dappSuggestedGasFees": null,
"txParams": {
"from": "0x0853dccd30e0582df80b16ec014092160b48e797",
"to": "0x8d09d17af2e20f51a9b598cb9edd01489a26ae27",
"value": "0x38d7ea4c68000",
"gas": "0x5208",
"maxFeePerGas": "0x47868c00",
"maxPriorityFeePerGas": "0x47868c00",
"type": "0x2"
},
"origin": "metamask",
"type": "sentEther",
"history": [
{
"id": 6854191329910881,
"time": 1631558469046,
"status": "unapproved",
"metamaskNetworkId": "42",
"chainId": "0x2a",
"loadingDefaults": true,
"dappSuggestedGasFees": null,
"txParams": {
"from": "0x0853dccd30e0582df80b16ec014092160b48e797",
"to": "0x8d09d17af2e20f51a9b598cb9edd01489a26ae27",
"value": "0x38d7ea4c68000",
"gas": "0x5208",
"maxFeePerGas": "0x47868c00",
"maxPriorityFeePerGas": "0x47868c00",
"type": "0x2"
},
"origin": "metamask",
"type": "sentEther"
},
[
{
"op": "replace",
"path": "/loadingDefaults",
"value": false,
"note": "Added new unapproved transaction.",
"timestamp": 1631558469059
},
{
"op": "add",
"path": "/userFeeLevel",
"value": "medium"
}
],
[
{
"op": "add",
"path": "/estimatedBaseFee",
"value": "0",
"note": "confTx: user approved transaction",
"timestamp": 1631558472917
}
],
[
{
"op": "replace",
"path": "/status",
"value": "approved",
"note": "txStateManager: setting status to approved",
"timestamp": 1631558472925
}
]
],
"userFeeLevel": "medium",
"estimatedBaseFee": "0"
},
"transactions": [
{
"id": 6854191329910881,
"time": 1631558469046,
"status": "approved",
"metamaskNetworkId": "42",
"chainId": "0x2a",
"loadingDefaults": false,
"dappSuggestedGasFees": null,
"txParams": {
"from": "0x0853dccd30e0582df80b16ec014092160b48e797",
"to": "0x8d09d17af2e20f51a9b598cb9edd01489a26ae27",
"value": "0x38d7ea4c68000",
"gas": "0x5208",
"maxFeePerGas": "0x47868c00",
"maxPriorityFeePerGas": "0x47868c00",
"type": "0x2"
},
"origin": "metamask",
"type": "sentEther",
"history": [
{
"id": 6854191329910881,
"time": 1631558469046,
"status": "unapproved",
"metamaskNetworkId": "42",
"chainId": "0x2a",
"loadingDefaults": true,
"dappSuggestedGasFees": null,
"txParams": {
"from": "0x0853dccd30e0582df80b16ec014092160b48e797",
"to": "0x8d09d17af2e20f51a9b598cb9edd01489a26ae27",
"value": "0x38d7ea4c68000",
"gas": "0x5208",
"maxFeePerGas": "0x47868c00",
"maxPriorityFeePerGas": "0x47868c00",
"type": "0x2"
},
"origin": "metamask",
"type": "sentEther"
},
[
{
"op": "replace",
"path": "/loadingDefaults",
"value": false,
"note": "Added new unapproved transaction.",
"timestamp": 1631558469059
},
{
"op": "add",
"path": "/userFeeLevel",
"value": "medium"
}
],
[
{
"op": "add",
"path": "/estimatedBaseFee",
"value": "0",
"note": "confTx: user approved transaction",
"timestamp": 1631558472917
}
],
[
{
"op": "replace",
"path": "/status",
"value": "approved",
"note": "txStateManager: setting status to approved",
"timestamp": 1631558472925
}
]
],
"userFeeLevel": "medium",
"estimatedBaseFee": "0"
}
]
}