@@ -22,15 +22,16 @@ export const fungibleAssetControllerTransfer = async (
2222
2323 assert ( asset ) ;
2424
25- const [ identity , counterParty ] = await Promise . all ( [
25+ const [ signerIdentity , counterParty ] = await Promise . all ( [
2626 sdk . getSigningIdentity ( ) ,
2727 sdk . identities . getIdentity ( { did : targetDid } ) ,
2828 ] ) ;
29- assert ( identity ) ;
29+ assert ( signerIdentity ) ;
3030 const { account : counterPartyAccount } = await counterParty . getPrimaryAccount ( ) ;
3131
3232 const transferTx = await sdk . settlements . addInstruction ( {
33- legs : [ { asset, from : identity , to : targetDid , amount : new BigNumber ( 1000 ) } ] ,
33+ legs : [ { asset, from : signerIdentity , to : targetDid , amount : new BigNumber ( 1000 ) } ] ,
34+ venueId : undefined ,
3435 } ) ;
3536 const instruction = await transferTx . run ( ) ;
3637 assert ( transferTx . isSuccess ) ;
@@ -54,7 +55,7 @@ export const fungibleAssetControllerTransfer = async (
5455
5556 const assetHolders = await asset . assetHolders . get ( ) ;
5657
57- const heldByIssuer = assetHolders . data . find ( ( { identity } ) => identity . isEqual ( identity ) ) ;
58+ const heldByIssuer = assetHolders . data . find ( ( { identity } ) => identity . isEqual ( signerIdentity ) ) ;
5859 assert ( heldByIssuer ) ;
5960 expect ( heldByIssuer . balance . eq ( new BigNumber ( 1100 ) ) ) ;
6061
@@ -82,11 +83,11 @@ export const nonFungibleAssetControllerTransfer = async (
8283
8384 assert ( collection ) ;
8485
85- const [ identity , counterParty ] = await Promise . all ( [
86+ const [ signerIdentity , counterParty ] = await Promise . all ( [
8687 sdk . getSigningIdentity ( ) ,
8788 sdk . identities . getIdentity ( { did : targetDid } ) ,
8889 ] ) ;
89- assert ( identity ) ;
90+ assert ( signerIdentity ) ;
9091 assert ( counterParty ) ;
9192
9293 const { account : counterPartyAccount } = await counterParty . getPrimaryAccount ( ) ;
@@ -128,7 +129,8 @@ export const nonFungibleAssetControllerTransfer = async (
128129 const nft2 = await issueTx2 . run ( ) ;
129130
130131 const transferTx = await sdk . settlements . addInstruction ( {
131- legs : [ { asset : collection , nfts : [ nft , nft2 ] , from : identity , to : targetDid } ] ,
132+ legs : [ { asset : collection , nfts : [ nft , nft2 ] , from : signerIdentity , to : targetDid } ] ,
133+ venueId : undefined ,
132134 } ) ;
133135 const instruction = await transferTx . run ( ) ;
134136 assert ( transferTx . isSuccess ) ;
@@ -152,7 +154,7 @@ export const nonFungibleAssetControllerTransfer = async (
152154
153155 const assetHolders = await collection . assetHolders . get ( { } ) ;
154156
155- let heldByIssuer = assetHolders . data . find ( ( { identity } ) => identity . isEqual ( identity ) ) ;
157+ let heldByIssuer = assetHolders . data . find ( ( { identity } ) => identity . isEqual ( signerIdentity ) ) ;
156158 assert ( heldByIssuer ) ;
157159 expect ( heldByIssuer . nfts . length ) . toEqual ( 1 ) ;
158160 expect ( heldByIssuer . nfts [ 0 ] . id . eq ( nft . id ) ) ;
@@ -169,7 +171,7 @@ export const nonFungibleAssetControllerTransfer = async (
169171 assert ( createPortfolioTx . isSuccess ) ;
170172
171173 const controllerTransferTx2 = await collection . controllerTransfer ( {
172- originPortfolio : { identity, id : portfolio . id } ,
174+ originPortfolio : { identity : signerIdentity , id : portfolio . id } ,
173175 nfts : [ nft2 ] ,
174176 } ) ;
175177 await controllerTransferTx2 . run ( ) ;
@@ -178,7 +180,7 @@ export const nonFungibleAssetControllerTransfer = async (
178180
179181 const assetHolders2 = await collection . assetHolders . get ( { } ) ;
180182
181- heldByIssuer = assetHolders2 . data . find ( ( { identity } ) => identity . isEqual ( identity ) ) ;
183+ heldByIssuer = assetHolders2 . data . find ( ( { identity } ) => identity . isEqual ( signerIdentity ) ) ;
182184 assert ( heldByIssuer ) ;
183185 expect ( heldByIssuer . nfts . length ) . toEqual ( 2 ) ;
184186
0 commit comments