I want to create a transaction with a memo, but i keep getting error

this.memo.toXDRObject is not a function at TransactionBuilder.build


    let fee = await get_mining_fee();

    const txOpts = {
        //memo : t.memo,
        networkPassphrase : get_stellar_network_from_env()

    const payment = {
        destination : address,
        asset : Stellar.Asset.native(),
        amount : amount+""
    const stellar_transaction = new Stellar.TransactionBuilder(our_account , txOpts)


        await StellarServer.submitTransaction(stellar_transaction);

I tried putting memo in txOpts and i get the same error. How do i add memo to transaction ocrrectly? If i omit memo field then transaction succeeds. t.memo is a string.

1 Answer 1


was changed to


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.