Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
overcat committed Sep 17, 2023
1 parent 26674bb commit 1523764
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions examples/soroban_auth_with_stellar_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
contract_id=contract_id,
function_name=func_name,
parameters=args,
source=op_invoker_kp.public_key
)
.build()
)
Expand All @@ -47,7 +46,7 @@
op.auth = [authorize_entry(
simulate_resp.results[0].auth[0], op_invoker_kp, simulate_resp.latest_ledger + 50, network_passphrase
)]
tx = soroban_server.prepare_transaction(tx)
tx = soroban_server.prepare_transaction(tx, simulate_resp)
except PrepareTransactionException as e:
print(f"Got exception: {e.simulate_transaction_response}")
raise e
Expand Down
4 changes: 2 additions & 2 deletions stellar_sdk/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ def authorize_entry(

# This structure is defined here:
# https://soroban.stellar.org/docs/fundamentals-and-concepts/invoking-contracts-with-transactions#stellar-account-signatures
addr_auth.signature = scval.to_map(
addr_auth.signature = scval.to_vec([scval.to_map(
{
scval.to_symbol("public_key"): scval.to_bytes(public_key),
scval.to_symbol("signature"): scval.to_bytes(signature),
}
)
)])
return entry


Expand Down

0 comments on commit 1523764

Please sign in to comment.