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
txnbuild requires asset issuer for allow_trust operations. This is in contrast to other SDKs that require just the asset code.
This should be changed so that only the asset code is required. Ideally we would want to limit the change to only the allow trust operation because we require asset issuers for other operations such change_trust
The text was updated successfully, but these errors were encountered:
This happens because txnbuild assumes assets must have an issuer, but the underlying XDR does not. It's an odd situation, because for some uses a partially configured asset is sufficient, but for others it is not.
There are several possible approaches we could take:
We could modify allow_trust so that an Asset that was passed in without an issuer would be sufficient. At the moment this will fail here. One approach is to build an xdr.AllowTrustOpAsset directly, using only the code, rather than by converting first to xdr.Asset.
Another option is to change txnbuild.Asset.ToXDR() so that converting to an XDR asset without an issuer is no longer an error (matching the underlying XDR's view). This weakens the checking in change trust. To get back to the current behaviour, we would then have to add validation for the presence of the issuer to that operation's construction.
A third option is to change the allow_trust API to just require a code, since this is actually all that's needed. This would be a breaking API change.
Closed in #1439. Went with the first suggestion from above as this guarantees no changes to the current API and its effect is limited to only the AllowTrust operation
txnbuild
requires asset issuer forallow_trust
operations. This is in contrast to other SDKs that require just the asset code.This should be changed so that only the asset code is required. Ideally we would want to limit the change to only the allow trust operation because we require asset issuers for other operations such
change_trust
The text was updated successfully, but these errors were encountered: