Recently discovered that in some special cases , the keysign payload will become very big , for example , on UTXO chains , if the user's address has a lot UTXOs, the the keysign payload become very big , and exceeded the 4kb limit of QR code.
We have to do this
First serialize the KeysignMessage to protobuf , 7zip it , and base 64 it
Check whether the total size is larger than 2048
if the total size is less than 2048 , use it to generate the QR code
If the total size is larger than 2048, then remove KeysignPayload , directly serialize KeysignPayload to protobuf bytes , 7zip it , and base64 encoded , and then upload it to relay server.
Set KeysignPayload in KeysignMessage to nil , and set the PayloadID to the hash which we used to upload to relay
Generate QR code with the new KeysignMessage
When Pair with another device , if the KeysignPayload is nil , and PayloadID is not empty, then we need to download the KeysignPayload from relay server.
Recently discovered that in some special cases , the keysign payload will become very big , for example , on UTXO chains , if the user's address has a lot UTXOs, the the keysign payload become very big , and exceeded the 4kb limit of QR code.
We have to do this
When Pair with another device , if the KeysignPayload is nil , and PayloadID is not empty, then we need to download the KeysignPayload from relay server.
Relevant IOS implementation is at https://github.com/vultisig/vultisig-ios/pull/1476/files
if you have any questions , feel free to ping me