I am trying to pay 2 tokens and I am getting this error:
sig = signer.sign_decorated(tx_hash)
AttributeError: 'Account' object has no attribute 'sign_decorated'
My code given below:
def transfer_amount(receiver_address, receiver_secret, customer_transaction_id):
print('Transferring Amount to {}'.format(receiver_address))
server = Server(horizon_url="https://horizon.stellar.org")
# This is distributer account
funding_keypair = Keypair.from_secret(settings.FUNDING_SECRET)
funding_public_key = funding_keypair.public_key
funding_account = server.load_account(funding_public_key)
ISSUER = 'GBZO6TJRF3GHXV4QM34UEBASA5MMFODM6EYDHOYTN4DNDGM3Y2XXKCYT' # For DEV COIN
receiving_account = Keypair.from_secret(receiver_secret)
transaction = (
TransactionBuilder(
source_account=funding_account,
network_passphrase=Network.PUBLIC_NETWORK_PASSPHRASE,
base_fee=server.fetch_base_fee(),
)
.add_text_memo('Ref: {}'.format(customer_transaction_id))
.append_payment_op(receiver_address, '2', 'DEV', ISSUER)
.build()
)
transaction.sign(funding_account)
response = server.submit_transaction(transaction)
print(response)