Skip to content

Commit

Permalink
Adding some more detail to SEP-6 page
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliotFriend committed Aug 18, 2023
1 parent 6f65096 commit ea945c6
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ The only reason we're storing anything about the transfer in BasicPay is to help
### (Sometimes) Modal step 5: Send a Stellar payment
In a withdrawal transaction, BasicPay will also present the user with a pre-built transaction for them to sign with their pincode. Here we will finally get to move back to our "regular" modal that _is_ so good at so many things!
In a withdrawal transaction, BasicPay will also build and present to the user a Stellar transaction for them to sign with their pincode. Here we will finally get to move back to our "regular" modal that _is_ so good at so many things!
```html title=/src/routes/dashboard/transfers/+page.svelte
<script>
Expand All @@ -269,6 +269,18 @@ In a withdrawal transaction, BasicPay will also present the user with a pre-buil
let paymentXDR = "";
let paymentNetwork = "";

// After a withdraw transaction has been presented to the user, and they've confirmed with the correct pincode, sign and submit the transaction to the Stellar network.
const onPaymentConfirm = async (pincode) => {
// Use the walletStore to sign the transaction
let signedTransaction = await walletStore.sign({
transactionXDR: paymentXDR,
network: paymentNetwork,
pincode: pincode,
});
// Submit the transaction to the Stellar network
await submit(signedTransaction);
};

// Builds a Stellar payment to present to the user which will complete a transfer to the Anchor.
let submitPayment = async ({
withdrawDetails,
Expand Down

0 comments on commit ea945c6

Please sign in to comment.