Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
panindustrial-dev committed Aug 15, 2024
1 parent 6b05b99 commit 79ea277
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#Changelog

## v0.4.2

- bump for icrc7-mo
- test for token_of after transfer
- Bug fix: https://github.com/PanIndustrial-Org/icrc_nft.mo/issues/3

## v0.4.0

- Breaking change: Owner is no longer handled in the metadata
Expand Down
6 changes: 3 additions & 3 deletions mops.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "icrc37-mo"
version = "0.4.1"
version = "0.4.2"
description = "icrc37 for motoko"
repository = "https://github.com/PanIndustrial-Org/icrc37.mo"
keywords = [ "nft" ]
license = "MIT"

[dependencies]
base = "https://github.com/dfinity/motoko-base#moc-0.10.0@a15ca7cd26335505e103288654f480a44463d844"
base = "0.11.1"
"base-0.7.3" = "https://github.com/dfinity/motoko-base#moc-0.7.3@aafcdee0c8328087aeed506e64aa2ff4ed329b47"
map9 = "https://github.com/ZhenyaUsenko/motoko-hash-map#v9.0.1@10b68f6ea8df5e72dfa4c07a50c8bb60a916c233"
candy_0_3_0 = "https://github.com/icdevs/candy_library#v0.3.0@907a4e7363aac6c6a4e114ebc73e3d3f21e138af"
Expand All @@ -16,7 +16,7 @@ stablebuffer_1_3_0 = "https://github.com/canscale/StableBuffer#v1.3.0@acdde6bb5b
encoding_0_4_1 = "https://github.com/aviate-labs/encoding.mo#v0.4.1@2711d18727e954b11afc0d37945608512b5fbce2"
vector = "0.2.0"
rep-indy-hash = "0.1.1"
icrc7-mo = "0.4.0"
icrc7-mo = "0.4.1"

[dev-dependencies]
test = "2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion src/lib.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1665,7 +1665,7 @@ module {
};
};

let ?transaction_result = environment.icrc7.finalize_token_transfer<system>(caller, {notification with
let ?transaction_result = environment.icrc7.finalize_token_transfer<system>(transferFromArgs.from.owner, {notification with
from_subaccount = notification.from.subaccount} : ICRC7.TransferArg, trx, trxtop, notification.token_id) else
return #ok(#Err(#GenericError({error_code = 2345; message = "unreachable null transaction"})));

Expand Down
14 changes: 14 additions & 0 deletions test/lib.test.mo
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,20 @@ testsys<system>("Transfer a token to another account after collection approval",

assert(ownerResponse.owner == testCanister);
assert(ownerResponse.subaccount == null);

let tokens_of = icrc7.tokens_of({owner = testCanister; subaccount = null}, null, null);

D.print("tokens_of" # debug_show(tokens_of));

assert(tokens_of[0] == 1);

let tokens_of2 = icrc7.tokens_of(testOwnerAccount, null, null);

D.print("tokens_of2" # debug_show(tokens_of2));

assert(tokens_of2.size() == 0);




});
Expand Down

0 comments on commit 79ea277

Please sign in to comment.