diff --git a/stellar_base/operation.py b/stellar_base/operation.py
index <HASH>..<HASH> 100644
--- a/stellar_base/operation.py
+++ b/stellar_base/operation.py
@@ -544,6 +544,7 @@ class AllowTrust(Operation):
             raise NotImplementedError(
                 "Operation of asset_type={} is not implemented"
                 ".".format(asset_type.type))
+        asset_code = asset_code.rstrip('\x00')
 
         return cls(
             source=source,
fix(Operation.AllowTrust): AllowTrust.from_xdr_object should return asset_code properly.