Skip to content

Commit

Permalink
more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
SamueleA committed May 23, 2024
1 parent 5396801 commit db41ec2
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion packages/checkout/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ An example usecase might be interacting with a minting contract.
The actual cryptoTransaction must be passed down to the `triggerTransaction` field.

```js
cons checkoutConfig = {
const checkoutConfig = {
{...},
cryptoCheckout: {
chainId: 137,
Expand All @@ -107,4 +107,25 @@ This field specific the list of collectibles that will show up in the order summ
quantityRaw: '100'
},
]
```

### Adding Funds with Credit Card
Kit also allows users to buy cryptocurrencies using credit card. Calling the triggerAddFunds function will cause a modal to appear.

```js
import { useCheckoutModal } from '@0xsequence/kit-checkout'

const MyComponent = () => {
const { triggerAddFunds } = useAddFundsModal()

const onClick = () => {
triggerAddFunds({
walletAddress: recipientAddress,
})
}

return (
<button onClick={onClick}>Add Funds</button>
)
}
```

0 comments on commit db41ec2

Please sign in to comment.