diff --git a/packages/core/src/constants.ts b/packages/core/src/constants.ts index eeb5f66ce..37bef5ba4 100644 --- a/packages/core/src/constants.ts +++ b/packages/core/src/constants.ts @@ -37,4 +37,5 @@ export const STORAGE_KEYS = { export const MOBILE_WINDOW_WIDTH = 768 -export const BN_PROTECT_RPC_URL = 'https://rpc.blocknative.com/boost' +export const BN_BOOST_RPC_URL = 'https://rpc.blocknative.com/boost' +export const BN_BOOST_INFO_URL = 'https://docs.blocknative.com/blocknative-mev-protection/transaction-boost-alpha' diff --git a/packages/core/src/validation.ts b/packages/core/src/validation.ts index f60456501..1a3bcf31c 100644 --- a/packages/core/src/validation.ts +++ b/packages/core/src/validation.ts @@ -183,7 +183,8 @@ const accountCenterInitOptions = Joi.object({ position: commonPositions, minimal: Joi.boolean(), containerElement: Joi.string(), - hideTransactionProtectionBtn: Joi.boolean() + hideTransactionProtectionBtn: Joi.boolean(), + transactionProtectionInfoLink: Joi.boolean() }) const accountCenter = Joi.object({ @@ -192,6 +193,7 @@ const accountCenter = Joi.object({ expanded: Joi.boolean(), minimal: Joi.boolean(), hideTransactionProtectionBtn: Joi.boolean(), + transactionProtectionInfoLink: Joi.boolean(), containerElement: Joi.string() }) diff --git a/packages/core/src/views/account-center/AccountCenterPanel.svelte b/packages/core/src/views/account-center/AccountCenterPanel.svelte index 58487dfe6..b9b882463 100644 --- a/packages/core/src/views/account-center/AccountCenterPanel.svelte +++ b/packages/core/src/views/account-center/AccountCenterPanel.svelte @@ -28,7 +28,7 @@ import { configuration } from '../../configuration.js' import SecondaryTokenTable from './SecondaryTokenTable.svelte' import { updateChainRPC } from '../../provider.js' - import { BN_PROTECT_RPC_URL } from '../../constants.js' + import { BN_BOOST_RPC_URL, BN_BOOST_INFO_URL } from '../../constants.js' export let expanded: boolean @@ -76,7 +76,7 @@ await updateChainRPC( primaryWallet.provider, validAppChain, - validAppChain?.protectedRpcUrl || BN_PROTECT_RPC_URL + validAppChain?.protectedRpcUrl || BN_BOOST_RPC_URL ) enableTransactionProtection = false } catch (error) { @@ -332,6 +332,8 @@ (enableTransactionProtection = false)} onEnable={() => enableProtectionRPC()} + transactionProtectionInfoLink={$accountCenter$.transactionProtectionInfoLink || + BN_BOOST_INFO_URL} /> {/if} diff --git a/packages/core/src/views/account-center/EnableTransactionProtectionModal.svelte b/packages/core/src/views/account-center/EnableTransactionProtectionModal.svelte index ef8bf725f..d2ca87ae2 100644 --- a/packages/core/src/views/account-center/EnableTransactionProtectionModal.svelte +++ b/packages/core/src/views/account-center/EnableTransactionProtectionModal.svelte @@ -6,6 +6,7 @@ export let onEnable: () => void export let onDismiss: () => void + export let transactionProtectionInfoLink: string