Skip to content

Commit

Permalink
algorand: Ensure optin transaction is the current transaction (#3131)
Browse files Browse the repository at this point in the history
* Ensure optin transaction is the current transaction and address the algo_seed transaction in a relative manner.

* Added core_approve.teal based on previous change.

* Fixed admin.py to make the tests pass.
  • Loading branch information
marcosnc authored Aug 16, 2023
1 parent 19b0c6d commit 0dcc53c
Show file tree
Hide file tree
Showing 3 changed files with 416 additions and 297 deletions.
2 changes: 1 addition & 1 deletion algorand/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ def parseVAA(self, vaa):
off += 2
ret["Fee"] = vaa[off:(off + 32)].hex()

if int.from_bytes((vaa[off:off+1]), "big") == 3:
if len(vaa[off:]) > 133 and int.from_bytes((vaa[off:off+1]), "big") == 3:
ret["Meta"] = "TokenBridge Transfer With Payload"
ret["Type"] = int.from_bytes((vaa[off:off+1]), "big")
off += 1
Expand Down
Loading

0 comments on commit 0dcc53c

Please sign in to comment.