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

Commit

Permalink
Merge pull request #2449 from bandprotocol/adjust-gas-limit
Browse files Browse the repository at this point in the history
Scan: adjust gas limit depends on msg
  • Loading branch information
Kanisorn Thongprapaisaeng authored Aug 10, 2020
2 parents ad9a1a4 + ce82d7f commit 9f68c14
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
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;

0 comments on commit 9f68c14

Please sign in to comment.