Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Revert "Refactor to use internal methods"
Browse files Browse the repository at this point in the history
This reverts commit e703140.
  • Loading branch information
mosmartin committed Sep 25, 2023
1 parent 4e4de86 commit b65a788
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
7 changes: 1 addition & 6 deletions framework/src/modules/nft/cc_commands/cc_transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,7 @@ export class CrossChainTransferCommand extends BaseCCCommand {
}

storeData.owner = recipientAddress;
await this._internalMethod.createNFTEntry(
getMethodContext(),
recipientAddress,
nftID,
storeData.attributesArray,
);
await nftStore.save(getMethodContext(), nftID, storeData);
await this._internalMethod.createUserEntry(getMethodContext(), recipientAddress, nftID);
await escrowStore.del(getMethodContext(), escrowStore.getKey(sendingChainID, nftID));
} else {
Expand Down
15 changes: 2 additions & 13 deletions framework/src/modules/nft/method.ts
Original file line number Diff line number Diff line change
Expand Up @@ -960,12 +960,7 @@ export class NFTMethod extends BaseMethod {
storedAttributes,
receivedAttributes,
);
await this._internalMethod.createNFTEntry(
methodContext,
nftData.owner,
nftID,
nftData.attributesArray,
);
await nftStore.save(methodContext, nftID, nftData);
await this._internalMethod.createUserEntry(methodContext, nftData.owner, nftID);
await escrowStore.del(methodContext, escrowStore.getKey(terminatedChainID, nftID));

Expand Down Expand Up @@ -1002,13 +997,7 @@ export class NFTMethod extends BaseMethod {
} else {
nftData.attributesArray.push({ module, attributes });
}

await this._internalMethod.createNFTEntry(
methodContext,
nftData.owner,
nftID,
nftData.attributesArray,
);
await nftStore.save(methodContext, nftID, nftData);

this.events.get(SetAttributesEvent).log(methodContext, {
nftID,
Expand Down

0 comments on commit b65a788

Please sign in to comment.