Issue Sending Whitelisted XDR (KinBaseCompat)
showered opened this issue · 3 comments
KinUtil
has been removed in the latest SDK, which means the XDRDecoder.decode()
method is no longer available.
This was the one of the steps in the recommended way of Whitelisting a transaction, as shown in the Sample App here:
The XDR returned from the app's server needs to be decoded before being sent (kinAccount.sendTransaction()
). In Android there is a method kinAccount.sendWhitelistTransaction()
but iOS doesn't have the same.
For the sake of backward compatibility, please could you re-introduce KinUtil
? I know it's not blockchain-agnostic, but it would only need to be in KinBaseCompat
Thanks!
Thanks for your feedback. I will look into adding kinAccount.sendWhitelistTransaction()
to KinBaseCompat. This should solve your problem without exposing deprecated decoders and transaction objects.
Actually after looking into the code, there is another option. You can simply construct a TransactionEnvelope
with the raw bytes that you receive from your whitelisting server and send it through kinAccount.sendTransaction(envelope)
.
import KinBase
// After receiving whitelisted transaction envelope data from your whitelisting server
let data = Data(base64Encoded: dataFromWhitelistingServer)
let envelope = TransactionEnvelope(envelopeXdrBytes: [Byte](data))
kinAccount.sendTransaction(envelope, completion: ...)
Let me know if this works for you.
It works. Thank you!