Skip to content

Commit

Permalink
fix: logic check WeaveVM's balance (#1312)
Browse files Browse the repository at this point in the history
  • Loading branch information
anhductn2001 authored Mar 7, 2025
1 parent 335cdbb commit 4a614bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data_layer/weavevm/weavevm.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,16 @@ func NewWeaveVM(root string) *WeaveVM {
panic(err)
}

balanceInt, err := strconv.ParseFloat(balance, 64)
balanceFloat, err := strconv.ParseFloat(balance, 64)
if err != nil {
panic(err)
}

if balanceInt > 0 {
if balanceFloat == 0 {
panic(fmt.Errorf("WeaveVM wallet need to be fund!"))
}

pterm.Println("WeaveVM Balance: ", balance)
pterm.Println("WeaveVM Balance: ", balanceFloat)

weavevmConfig.RpcEndpoint = daData.ApiUrl
weavevmConfig.Root = root
Expand Down

0 comments on commit 4a614bc

Please sign in to comment.