Skip to content

Chore: replace dead apas field with foreignAssets on extra-txn descriptors #2

@temptemp3

Description

@temptemp3

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions