Skip to content

Commit

Permalink
display gaslimit (#737)
Browse files Browse the repository at this point in the history
* display gaslimit

* add maxgas for callsc

* update station version
  • Loading branch information
B-Naoufal authored Sep 18, 2023
1 parent 3a4b2bd commit 70f10cd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/go-openapi/runtime v0.25.0
github.com/jessevdk/go-flags v1.5.0
github.com/labstack/gommon v0.4.0
github.com/massalabs/station v0.3.3-0.20230904155315-852f45c6fe89
github.com/massalabs/station v0.3.5-0.20230918142757-8967f55f2177
github.com/massalabs/station-massa-hello-world v0.0.10
github.com/pkg/errors v0.9.1
github.com/rs/cors v1.8.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
github.com/massalabs/station v0.3.3-0.20230904155315-852f45c6fe89 h1:XmEw6l1UfHuBlx2pmQL9emSvi+V+sOWdBgg3bROLwM4=
github.com/massalabs/station v0.3.3-0.20230904155315-852f45c6fe89/go.mod h1:ZrSECv8dWd2UJESRpzIIjwo4SUKScmNfVf6STbr/2Sc=
github.com/massalabs/station v0.3.5-0.20230918142757-8967f55f2177 h1:x7Jwx6hi9ON1lLxAfpe01L6gt8ER66lGpGChZXMKdzc=
github.com/massalabs/station v0.3.5-0.20230918142757-8967f55f2177/go.mod h1:ZrSECv8dWd2UJESRpzIIjwo4SUKScmNfVf6STbr/2Sc=
github.com/massalabs/station-massa-hello-world v0.0.10 h1:gzsPRD8PmFsGmd1UFG/xpOFut0zm4JKEUmjGo/g/fAA=
github.com/massalabs/station-massa-hello-world v0.0.10/go.mod h1:K1mf69YpRPPZziE53KHXE5IKlTMqU3r1wuLL0MWM21k=
github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
Expand Down
3 changes: 1 addition & 2 deletions internal/handler/wallet/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ type PromptRequestSignData struct {
Fees string
OperationType string
OperationID uint64
GasLimit string
Coins string
Address string
Function string
Expand Down Expand Up @@ -212,7 +211,7 @@ func (s *walletSign) prepareCallSCPromptRequest(msg *callsc.MessageContent,
Fees: strconv.FormatUint(fees, 10),
OperationType: "Call SC",
OperationID: msg.OperationID,
GasLimit: strconv.FormatUint(msg.GasLimit, 10),
MaxGas: strconv.FormatUint(msg.MaxGas, 10),
Coins: strconv.FormatUint(msg.Coins, 10),
Address: msg.Address,
Function: msg.Function,
Expand Down
2 changes: 1 addition & 1 deletion pkg/network/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func (n *NodeFetcher) MakeOperation(fee uint64, operation sendOperation.Operatio
return nil, err
}

msg, _, err := sendOperation.MakeOperation(client, sendOperation.DefaultSlotsDuration, fee, operation)
msg, _, err := sendOperation.MakeOperation(client, sendOperation.DefaultExpiryInSlot, fee, operation)
if err != nil {
return nil, err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export function CallSc(props: PromptRequestData) {
const {
Coins,
Fees,
MaxGas,
Address,
WalletAddress,
Function: CalledFunction,
Expand Down Expand Up @@ -105,6 +106,10 @@ export function CallSc(props: PromptRequestData) {
{formatStandard(Fees, Unit.NanoMAS)} {masToken}
</p>
</div>
<div className="flex w-full items-center justify-between">
<p>{Intl.t('password-prompt.sign.max-gas')} </p>
<p>{formatStandard(MaxGas)}</p>
</div>
<div className="flex w-full items-center justify-between">
<p>{Intl.t('password-prompt.sign.expiry')} </p>
<p>{Expiry}</p>
Expand Down

0 comments on commit 70f10cd

Please sign in to comment.