-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accept relayed tx v3 with sender account non-existent #6677
Conversation
accountHandler, err := txv.getSenderAccount(interceptedTx) | ||
if err != nil { | ||
if err != nil && !shouldAllowMissingSenderAccount { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check for ErrAccountNotFound
(explicitly)? Just a question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is necessary, as ErrAccountNotFound
is the only one returned from getSenderAccount
method
return err | ||
} | ||
|
||
return txv.checkAccount(interceptedTx, accountHandler) | ||
} | ||
|
||
func hasTxValue(interceptedTx process.InterceptedTransactionHandler) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, we don't handle MultiESDTTransfer
with EGLD in interceptor (we never did, but that is OK).
return false | ||
} | ||
|
||
return big.NewInt(0).Cmp(txValue) < 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe directly use Sign()
method of txValue
, without instantiating a new big int (zero)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pushed
The base branch was changed.
Reasoning behind the pull request
Proposed changes
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?