Skip to content

Commit

Permalink
do not get height to run query against latest, just use latest bool
Browse files Browse the repository at this point in the history
  • Loading branch information
bjartek committed Feb 27, 2024
1 parent b964265 commit 1211fec
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions script.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,8 @@ func (fbi *OverflowInteractionBuilder) runScript() *OverflowScriptResult {
}
sc := fbi.ScriptQuery
if fbi.ScriptQuery == nil {
block, err := o.GetLatestBlock(fbi.Ctx)
if err != nil {
osc.Err = err
return osc
}
sc = &flowkit.ScriptQuery{
Height: block.Height,
Latest: true,
}
}
result, err := o.Flowkit.ExecuteScript(fbi.Ctx, script, *sc)
Expand Down

0 comments on commit 1211fec

Please sign in to comment.