Skip to content

Commit

Permalink
fixed the pledge period variable
Browse files Browse the repository at this point in the history
  • Loading branch information
arnabghose997 committed Jul 12, 2024
1 parent a782594 commit 1725932
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 1 addition & 2 deletions core/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

"github.com/rubixchain/rubixgoplatform/contract"
"github.com/rubixchain/rubixgoplatform/core/model"
"github.com/rubixchain/rubixgoplatform/core/unpledge"
"github.com/rubixchain/rubixgoplatform/core/wallet"
"github.com/rubixchain/rubixgoplatform/did"
"github.com/rubixchain/rubixgoplatform/wrapper/uuid"
Expand Down Expand Up @@ -101,7 +100,7 @@ func gatherTokensForTransaction(c *Core, req *model.RBTTransferRequest, dc did.D
return nil, fmt.Errorf("failed to get transaction details for trx hash: %v, err: %v", token.TransactionID, err)
}

if time.Now().Unix() - tokenTransactionDetail.Epoch > int64(unpledge.PledgePeriodInSeconds) {
if time.Now().Unix() - tokenTransactionDetail.Epoch > int64(pledgePeriodInSeconds) {
if err := c.w.LockToken(&token); err != nil {
return nil, fmt.Errorf("failed to lock tokens %v, exiting selfTransfer routine with error: %v", token.TokenID, err.Error())
}
Expand Down
2 changes: 0 additions & 2 deletions core/unpledge/unpledge.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import (
)

const (
PledgePeriodInSeconds int = 7 * 24 * 60 * 60

UnpledgeQueueTable string = "unpledgequeue"
)

Expand Down

0 comments on commit 1725932

Please sign in to comment.