-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
featIssue is a featureIssue is a feature
Description
Discussed in #1844
Originally posted by Dhaiwat10 March 7, 2024
Take this Sway function signature for example:
fn new_game(player: Identity);If you try to call this function via the TS SDK, it would look something like this:
await contract.functions.new_game({ Address: { value: walletAddress });
await contract.functions.new_game({ ContractId: { value: contractId });The idea is to change it to something like:
type Identity = {address: string, contractId?: never} | {address?: never; contractId: string}
await contract.functions.new_game({ address: walletAddress });
await contract.functions.new_game({ contractId: contractId });Metadata
Metadata
Assignees
Labels
featIssue is a featureIssue is a feature