AccountRequiresMemoException class

Exception thrown when a transaction without a memo pays an account that requires one (SEP-29).

An account requires a memo on incoming payments when its data entry config.memo_required is set to 1. The submit methods of StellarSDK and StellarSDK.checkMemoRequired throw this exception before anything is submitted, when the checked transaction carries no memo and one of its payment, path payment or account merge operations names such an account as a non-multiplexed destination.

Example:

try {
  await sdk.submitTransaction(transaction);
} on AccountRequiresMemoException catch (e) {
  print("Account ${e.accountId} requires a memo "
      "(operation ${e.operationIndex})");
}

See also:

Implemented types

Constructors

AccountRequiresMemoException(String accountId, int operationIndex)
Creates an exception for the destination accountId named by the operation at operationIndex.

Properties

accountId → String
The account id (G...) of the destination account that requires a memo.
final
hashCode → int
The hash code for this object.
no setterinherited
operationIndex → int
The zero-based index, over all operations of the checked transaction, of the first payment, path payment or account merge operation that names accountId as a non-multiplexed destination.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited