Context
The extra-txn descriptors passed to ci.setExtraTxns() use apas: [assetId] to declare foreign assets. However, apas is not a field recognized by algosdk.makeApplicationCallTxnFromObject — the SDK expects foreignAssets. The apas field is silently ignored during transaction construction.
This hasn't caused issues in practice because:
But the dead field is misleading to future readers who may assume it's doing something.
Locations
lib/builders.js lines 213-214 (apas: [toAssetId])
lib/builders.js line 219 (fields.apas = [toAssetId])
lib/nnt200.js line 98 (apas: [assetId])
Suggested action
Investigate whether replacing apas with foreignAssets on the extra-txn descriptors is picked up by arccjs or algosdk. If it is, replace all occurrences. If not (because the "merge" strategy overrides foreignAssets anyway), document apas as intentionally inert and add a code comment explaining why it exists.
Related: #1
Context
The extra-txn descriptors passed to
ci.setExtraTxns()useapas: [assetId]to declare foreign assets. However,apasis not a field recognized byalgosdk.makeApplicationCallTxnFromObject— the SDK expectsforeignAssets. Theapasfield is silently ignored during transaction construction.This hasn't caused issues in practice because:
lib/builders.js) works via group resource sharing across the larger transaction group.lib/nnt200.js) was switched to the "default" GRS strategy in Fix withdraw_nnt200 missing foreignAssets for underlying ASA #1, which carries assets via separate GRS helper transactions.But the dead field is misleading to future readers who may assume it's doing something.
Locations
lib/builders.jslines 213-214 (apas: [toAssetId])lib/builders.jsline 219 (fields.apas = [toAssetId])lib/nnt200.jsline 98 (apas: [assetId])Suggested action
Investigate whether replacing
apaswithforeignAssetson the extra-txn descriptors is picked up by arccjs or algosdk. If it is, replace all occurrences. If not (because the "merge" strategy overridesforeignAssetsanyway), documentapasas intentionally inert and add a code comment explaining why it exists.Related: #1