Ensure that schema objects are sent in the format expected by the Mobile Wallets.
Changes
Translate the Schema object into one that JSON encodes as expected by the Mobile Wallet Crypto library.
Currently the schema objects are sent directly which means that the type field has unexpected values and the value is converted to a Buffer (format {type: "Buffer", data: [<bytes>]}) instead of a base64 encoded string.
The Android wallet accepts the current payload but silently fails to decode the parameters and just prints "No parameters". I've verified that it prints the correct payload after this change. The iOS wallet's WalletConnect implementation is going to accept both formats.
Purpose
Ensure that schema objects are sent in the format expected by the Mobile Wallets.
Changes
Translate the
Schema
object into one that JSON encodes as expected by the Mobile Wallet Crypto library.Currently the schema objects are sent directly which means that the
type
field has unexpected values and the value is converted to aBuffer
(format{type: "Buffer", data: [<bytes>]}
) instead of a base64 encoded string.The Android wallet accepts the current payload but silently fails to decode the parameters and just prints "No parameters". I've verified that it prints the correct payload after this change. The iOS wallet's WalletConnect implementation is going to accept both formats.