diff --git a/packages/checkout/sdk-sample-app/src/pages/PassportLoginCallback.tsx b/packages/checkout/sdk-sample-app/src/pages/PassportLoginCallback.tsx
new file mode 100644
index 0000000000..2ce42133af
--- /dev/null
+++ b/packages/checkout/sdk-sample-app/src/pages/PassportLoginCallback.tsx
@@ -0,0 +1,9 @@
+import { useEffect } from 'react';
+import { passport } from '../passport';
+
+export function PassportLoginCallback() {
+ useEffect(() => {
+ passport?.loginCallback();
+ }, [passport])
+ return(<>>);
+}
diff --git a/packages/checkout/widgets-lib/src/components/Transactions/TransactionDetails.tsx b/packages/checkout/widgets-lib/src/components/Transactions/TransactionDetails.tsx
index 9e5d4023be..898e87378c 100644
--- a/packages/checkout/widgets-lib/src/components/Transactions/TransactionDetails.tsx
+++ b/packages/checkout/widgets-lib/src/components/Transactions/TransactionDetails.tsx
@@ -1,16 +1,19 @@
import {
- Box, Icon, Body, EllipsizedText,
+ Box, Icon, Body, EllipsizedText, FramedImage,
} from '@biom3/react';
import { ChainSlug } from '@imtbl/checkout-sdk';
-import { logoColour, networkIcon, networkName } from 'lib';
+import { networkName } from 'lib';
import { getChainIdBySlug } from 'lib/chains';
import { Transaction } from 'lib/clients';
+import { Environment } from '@imtbl/config';
+import { getChainImage } from '../../lib/utils';
export interface TransactionDetailsProps {
transaction: Transaction;
+ environment: Environment;
}
-export function TransactionDetails({ transaction }: TransactionDetailsProps) {
+export function TransactionDetails({ transaction, environment }: TransactionDetailsProps) {
const fromChain = getChainIdBySlug(transaction.details.from_chain as ChainSlug);
const toChain = getChainIdBySlug(transaction.details.to_chain as ChainSlug);
return (
@@ -20,13 +23,17 @@ export function TransactionDetails({ transaction }: TransactionDetailsProps) {
gap: 'base.spacing.x2',
}}
>
-
+ )}
/>
-
+ )}
/>
(false);
@@ -130,7 +133,7 @@ export function TransactionItem({
px: 'base.spacing.x2',
}}
/>
-
+
diff --git a/packages/checkout/widgets-lib/src/components/Transactions/TransactionItemWithdrawPending.tsx b/packages/checkout/widgets-lib/src/components/Transactions/TransactionItemWithdrawPending.tsx
index bf2b978ec1..d4a7b5a705 100644
--- a/packages/checkout/widgets-lib/src/components/Transactions/TransactionItemWithdrawPending.tsx
+++ b/packages/checkout/widgets-lib/src/components/Transactions/TransactionItemWithdrawPending.tsx
@@ -13,6 +13,7 @@ import { useContext, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { BridgeWidgetViews } from 'context/view-context/BridgeViewContextTypes';
import { ViewActions, ViewContext } from 'context/view-context/ViewContext';
+import { Environment } from '@imtbl/config';
import { actionsContainerStyles, actionsLayoutStyles, containerStyles } from './transactionItemStyles';
import { TransactionDetails } from './TransactionDetails';
@@ -23,6 +24,7 @@ type TransactionItemWithdrawPendingProps = {
amount: string,
icon: string,
defaultTokenImage: string,
+ environment: Environment,
};
export function TransactionItemWithdrawPending({
@@ -32,6 +34,7 @@ export function TransactionItemWithdrawPending({
amount,
icon,
defaultTokenImage,
+ environment,
}: TransactionItemWithdrawPendingProps) {
const { viewDispatch } = useContext(ViewContext);
const { track } = useAnalytics();
@@ -189,7 +192,7 @@ export function TransactionItemWithdrawPending({
px: 'base.spacing.x2',
}}
/>
-
+
diff --git a/packages/checkout/widgets-lib/src/components/Transactions/TransactionList.tsx b/packages/checkout/widgets-lib/src/components/Transactions/TransactionList.tsx
index 74a23bd5e6..628d0d1abf 100644
--- a/packages/checkout/widgets-lib/src/components/Transactions/TransactionList.tsx
+++ b/packages/checkout/widgets-lib/src/components/Transactions/TransactionList.tsx
@@ -41,6 +41,7 @@ export function TransactionList({
const { cryptoFiatState } = useContext(CryptoFiatContext);
const { t } = useTranslation();
const [link, setLink] = useState('');
+ const { environment } = checkout.config;
useEffect(() => {
if (!checkout) return;
@@ -87,12 +88,13 @@ export function TransactionList({
return (
);
}
@@ -100,13 +102,14 @@ export function TransactionList({
return (
);
})}
diff --git a/packages/checkout/widgets-lib/src/lib/utils.ts b/packages/checkout/widgets-lib/src/lib/utils.ts
index d667da2d95..dfcbfb23be 100644
--- a/packages/checkout/widgets-lib/src/lib/utils.ts
+++ b/packages/checkout/widgets-lib/src/lib/utils.ts
@@ -154,6 +154,10 @@ export function getRemoteImage(environment: Environment | undefined, path: strin
return `${CHECKOUT_CDN_BASE_URL[environment ?? Environment.PRODUCTION]}/v1/blob/img${path}`;
}
+export function getChainImage(environment: Environment | undefined, chainId: ChainId) {
+ return getRemoteImage(environment, `/chains/${chainId}.png`);
+}
+
export function getEthTokenImage(environment: Environment | undefined) {
return getRemoteImage(environment, '/tokens/eth.svg');
}
diff --git a/packages/checkout/widgets-lib/src/widgets/bridge/components/BridgeReviewSummary.tsx b/packages/checkout/widgets-lib/src/widgets/bridge/components/BridgeReviewSummary.tsx
index 741e8ee234..75a6aa7e0c 100644
--- a/packages/checkout/widgets-lib/src/widgets/bridge/components/BridgeReviewSummary.tsx
+++ b/packages/checkout/widgets-lib/src/widgets/bridge/components/BridgeReviewSummary.tsx
@@ -16,7 +16,7 @@ import {
isPassportProvider,
isWalletConnectProvider,
} from 'lib/provider';
-import { calculateCryptoToFiat, isNativeToken } from 'lib/utils';
+import { calculateCryptoToFiat, getChainImage, isNativeToken } from 'lib/utils';
import {
DEFAULT_QUOTE_REFRESH_INTERVAL,
DEFAULT_TOKEN_DECIMALS,
@@ -26,7 +26,7 @@ import {
addChainChangedListener,
getL1ChainId,
getL2ChainId,
- networkIcon,
+ networkName,
removeChainChangedListener,
} from 'lib';
import { useInterval } from 'lib/hooks/useInterval';
@@ -41,7 +41,6 @@ import { NetworkSwitchDrawer } from 'components/NetworkSwitchDrawer/NetworkSwitc
import { Web3Provider } from '@ethersproject/providers';
import { useWalletConnect } from 'lib/hooks/useWalletConnect';
import { NotEnoughGas } from 'components/NotEnoughGas/NotEnoughGas';
-import { networkIconStyles } from './WalletNetworkButtonStyles';
import {
arrowIconStyles,
arrowIconWrapperStyles,
@@ -52,6 +51,7 @@ import {
topMenuItemStyles,
wcStickerLogoStyles,
wcWalletLogoStyles,
+ networkIconStyles,
} from './BridgeReviewSummaryStyles';
import { BridgeActions, BridgeContext } from '../context/BridgeContext';
import {
@@ -76,6 +76,7 @@ export function BridgeReviewSummary() {
},
bridgeDispatch,
} = useContext(BridgeContext);
+ const { environment } = checkout.config;
const { track } = useAnalytics();
@@ -477,9 +478,14 @@ export function BridgeReviewSummary() {