Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

Scan: adjust gas limit depends on msg #2449

Merged
merged 5 commits into from
Aug 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG_UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

### Scan

- (impv) [\#2449](https://github.com/bandprotocol/bandchain/pull/2449) Adjusted gas limit as msg
- (impv) [\#2416](https://github.com/bandprotocol/bandchain/pull/2416) Added more HD Path index for ledger
- (impv) [\#2394](https://github.com/bandprotocol/bandchain/pull/2394) Implemented the msg on TxMobileTable for GUANYU
- (bugs) [\#2383](https://github.com/bandprotocol/bandchain/pull/2383) Support `EditValidator` Message for Wenchang and Guan Yu
Expand Down
2 changes: 1 addition & 1 deletion scan/src/components/modal/submitTx/SubmitTxModal.re
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ module SubmitTxStep = {
let make = (~account: AccountContext.t, ~setRawTx, ~isActive, ~msg) => {
let (msgsOpt, setMsgsOpt) = React.useState(_ => None);

let gas = 500000;
let gas = SubmitMsg.gasLimit(msg);
let fee = 5000.;
let (memo, setMemo) = React.useState(_ => EnhanceTxInput.{text: "", value: Some("")});

Expand Down
8 changes: 8 additions & 0 deletions scan/src/utils/SubmitMsg.re
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,11 @@ let toString =
| Undelegate(_) => "Undelegate"
| Redelegate(_) => "Redelegate"
| WithdrawReward(_) => "Withdraw Reward";

let gasLimit =
fun
| Send(_)
| Delegate(_)
| Undelegate(_)
| WithdrawReward(_) => 200000
| Redelegate(_) => 300000;