Skip to content

Commit 665cad2

Browse files
committed
4624-query-strings
1 parent 4faaaa5 commit 665cad2

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

examples/react/src/components/Connected.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ import { delay, getCheckoutSettings, getOrderbookCalldata } from '../utils'
3333
// append ?debug to url to enable debug mode
3434
const searchParams = new URLSearchParams(location.search)
3535
const isDebugMode = searchParams.has('debug')
36+
const checkoutProvider = searchParams.get('checkoutProvider')
37+
const onRampProvider = searchParams.get('onRampProvider')
3638

3739
export const Connected = () => {
3840
const { setOpenConnectModal } = useOpenConnectModal()
@@ -391,8 +393,8 @@ export const Connected = () => {
391393
recipientAddress: address,
392394
currencyAddress,
393395
collectionAddress,
394-
creditCardProviders: ['sardine', 'transak'],
395-
onRampProvider: TransactionOnRampProvider.sardine,
396+
creditCardProviders: [checkoutProvider || 'transak'],
397+
onRampProvider: onRampProvider ? (onRampProvider as TransactionOnRampProvider) : TransactionOnRampProvider.transak,
396398
transakConfig: {
397399
contractId,
398400
apiKey: '5911d9ec-46b5-48fa-a755-d59a715ff0cf'
@@ -444,7 +446,7 @@ export const Connected = () => {
444446
const onClickAddFunds = () => {
445447
triggerAddFunds({
446448
walletAddress: address || '',
447-
provider: TransactionOnRampProvider.transak
449+
provider: onRampProvider ? (onRampProvider as TransactionOnRampProvider) : TransactionOnRampProvider.transak
448450
})
449451
}
450452

packages/connect/src/styles.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,12 @@ export const styles = String.raw`
553553
.w-screen {
554554
width: 100vw;
555555
}
556+
.max-w-1 {
557+
max-width: calc(var(--spacing) * 1);
558+
}
559+
.max-w-1\/2 {
560+
max-width: calc(1/2 * 100%);
561+
}
556562
.max-w-\[532px\] {
557563
max-width: 532px;
558564
}

0 commit comments

Comments
 (0)