Skip to content

Commit

Permalink
Merge pull request #1716 from 0chain/fix/allocstatus-check
Browse files Browse the repository at this point in the history
Add check for wallet id
  • Loading branch information
dabasov authored Dec 26, 2024
2 parents 9ddde94 + 5f28a53 commit 49c9e5d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wasmsdk/blobber.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"time"

"github.com/0chain/gosdk/constants"
"github.com/0chain/gosdk/core/client"
"github.com/0chain/gosdk/core/common"
"github.com/0chain/gosdk/core/encryption"
"github.com/0chain/gosdk/core/pathutil"
Expand Down Expand Up @@ -1136,6 +1137,9 @@ func checkAllocStatus(allocationID string) (string, error) {
if err != nil {
return "", err
}
if client.Wallet().ClientID != alloc.Owner {
return "", errors.New("client id does not match with the allocation owner")
}
status, blobberStatus, err := alloc.CheckAllocStatus()
var statusStr string
switch status {
Expand Down

0 comments on commit 49c9e5d

Please sign in to comment.