Skip to content

Commit

Permalink
FATE: AENSv2.DataPt should contain FATE_BYTES (#4255)
Browse files Browse the repository at this point in the history
* Extend test, did not use AENSv2.DataPt in both directions

* Fix AENSv2.DataPt it should contain FATE_BYTES
  • Loading branch information
hanssv committed Jan 24, 2024
1 parent 263750b commit 401b21c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/aefate/src/aefa_fate_op.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2167,7 +2167,7 @@ mk_fate_pointee_v1(Id, _ES) ->
end.

mk_fate_pointee_v2({data, Data}) when is_binary(Data) ->
aeb_fate_data:make_variant([1, 1, 1, 1, 1], 4, {?FATE_STRING(Data)});
aeb_fate_data:make_variant([1, 1, 1, 1, 1], 4, {?FATE_BYTES(Data)});
mk_fate_pointee_v2(Id) ->
case aeser_id:specialize(Id) of
{account, PK} -> aeb_fate_data:make_variant([1, 1, 1, 1, 1], 0, {?FATE_ADDRESS(PK)});
Expand Down
3 changes: 2 additions & 1 deletion test/contracts/aens_lookup.aes
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ contract Test =
let p2 = AENSv2.ContractPt(addr)
let p3 = AENSv2.OraclePt(Call.caller)
let p4 = AENSv2.ChannelPt(addr)
let p5 = AENSv2.DataPt(Bytes.to_any_size(#aabbccdd))
let pts = {["account_pubkey"] = p1, ["contract_pubkey"] = p2,
["misc1"] = p3, ["misc2"] = p4}
["misc1"] = p3, ["misc2"] = p4, ["misc3"] = p5}

AENSv2.update(addr, name, Some(RelativeTTL(1000)), None, Some(pts))

Expand Down

0 comments on commit 401b21c

Please sign in to comment.