You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
question about the decisions made in the repository
question about how to use this project
Summary
The following function does not work.
// {// "name": "LSP8ReferenceContract",// "key": "0x708e7b881795f2e6b6c2752108c177ec89248458de3bf69d0d43480b3e5034e6",// "keyType": "Singleton",// "valueType": "(address,bytes32)",// "valueContent": "(Address,Bytes32)"// }test('render view with data key `LSP8ReferenceContract` + data value = tuple (address,bytes32) as [ "0xcafecafecafecafecafecafecafecafecafecafe", "0xbeefbeef...beefbeef" ]',async()=>{constexpectedDataKeyText='LSP8TokenIdFormat'constexpectedDataValueText='[ "0xcafecafecafecafecafecafecafecafecafecafe", "0xbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeef" ]'constencodedDataValue=ERC725.encodeValueContent('(Address,Bytes32)',['0xcafecafecafecafecafecafecafecafecafecafe','0xbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeef',])render(DefaultSetDataKey,{props: {transaction: {to: UP_ADDRESS_EXAMPLE,},setDataKeyValuePair: {setDataKey: ERC725YDataKeys.LSP8.LSP8TokenIdFormat,setDataValue: encodedDataValue,},},})expect(awaitscreen.findByTestId('set-data-key-text')).toHaveTextContent(expectedDataKeyText)expect(awaitscreen.findByTestId('set-data-value-text')).toHaveTextContent(expectedDataValueText)})
It generates the following errors:
Error: Argument of type 'string[]' is not assignable to parameter of type 'string | number | boolean | AssetURLEncode | URLDataToEncode'
Encoding tuples is still possible with the encodeData function, but this requires to pass a schema, which increases a bit the complexity of the library.
It should be consider whether we want to allow or not tuple encoding / decoding with the encodeValueContent function for simplicity for developers.
The text was updated successfully, but these errors were encountered:
I'm submitting a...
Summary
The following function does not work.
It generates the following errors:
Encoding tuples is still possible with the
encodeData
function, but this requires to pass a schema, which increases a bit the complexity of the library.It should be consider whether we want to allow or not tuple encoding / decoding with the
encodeValueContent
function for simplicity for developers.The text was updated successfully, but these errors were encountered: