hyperledger-firefly / hyperledger-firefly/sdk-nodejs

Incorrect type for message in FireFlyTokenTransferRequest

Open
#63 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
16
Forks
9
Avg merge
5h 41m
Merged PRs (30d)
8

Description

It seems the type for `message` within `FireFlyTokenTransferRequest` is incorrect. Instead of accepting a message object, it is expecting a string.
```
requestBody: {
content: {
"application/json": {
....
....
/**
* Format: uuid
* @description The UUID of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector
*/
message?: string;
....
....
};
};
};
```

https://github.com/hyperledger/firefly/blob/main/pkg/core/tokentransfer.go#L29-L55
This may be a limitation of the swagger generator, because `Message` is type `fftypes.UUID` on `TokenTransfer`, but the actual input for that api is `TokenTransferInput`, which wraps `TokenTransfer` and also has a `Message` field of type `MessageInOut`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.