IBM / blockchainbean2

This code pattern shows how to model a supply-chain network using the IBM Blockchain Platform and is based on a collaboration with Brooklyn Roasting Company. The story, along with the supply-chain documents that were used to model this network, can be found at: https://www.ibm.com/blockchainbean. Note that the 'view the blockchain' button is being migrated''
https://developer.ibm.com/patterns/coffee-supply-chain-network-hyperledger-fabric-blockchain-2/
122 stars 84 forks source link

verifyArguments: Transaction arguments must be strings #12

Closed ronaldl29 closed 5 years ago

ronaldl29 commented 5 years ago

When adding a model with a property that is not a string (ex: number) I am getting back:

verifyArguments: Transaction arguments must be strings:

Is it possible to modify this to allow different data types or is there a reason for only allowing strings?

horeaporutiu commented 5 years ago

@ronaldlong46 contract.Submit transaction takes in a string for arguments: https://fabric-sdk-node.github.io/master/module-fabric-network.Contract.html#submitTransaction

So maybe what you could do is do something like

args = JSON.stringify(args)
let result = await contract.submitTransaction(func, args)
horeaporutiu commented 5 years ago

closing due to inactivity.

iliassays commented 4 years ago

Hello. What about using collection? Ex- interface Customer{ name: string, addressList: Array

}

interface Address{ city: string; country: string; state: string }