From e823a589f595d799d6717443a2257ae00844959c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Rodr=C3=ADguez?= Date: Sat, 27 Sep 2025 00:05:08 +0200 Subject: [PATCH 1/3] [chore] update documentation link --- src/config/navigation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/navigation.ts b/src/config/navigation.ts index 675ef4e9..b609f938 100644 --- a/src/config/navigation.ts +++ b/src/config/navigation.ts @@ -66,7 +66,7 @@ const baseMainMenu = [ label: 'Documentation', icon: SummarizeIcon, iconClassName: 'h-5 w-5', - link: 'https://docs.dimo.zone/developer-platform', + link: 'https://dimo.org/docs', external: true, disabled: false, }, From 7c03a734ff1593524bc0d64c70d62212b8b083e1 Mon Sep 17 00:00:00 2001 From: zer0stars Date: Wed, 5 Nov 2025 15:37:55 -0500 Subject: [PATCH 2/3] Adding pluggedin --- src/utils/webhook.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils/webhook.ts b/src/utils/webhook.ts index 9e542b23..e0f65956 100644 --- a/src/utils/webhook.ts +++ b/src/utils/webhook.ts @@ -49,6 +49,12 @@ export const conditionsConfig: ConditionConfig[] = [ inputType: 'number', validation: numericValidation, }, + { + field: 'obdIsPluggedIn', + label: 'Device Plugged In', + inputType: 'boolean', + validation: booleanValidation, + }, { field: 'isIgnitionOn', label: 'Is Ignition On', From f705f4ad9b3474e2210b2ef121a3209f726e21ca Mon Sep 17 00:00:00 2001 From: Barrett Date: Wed, 19 Nov 2025 18:48:44 -0500 Subject: [PATCH 3/3] remove balance checks --- .../create/[owner]/components/View/View.tsx | 19 +++---- .../SpendingLimitModal/SpendingLimitModal.tsx | 3 +- src/hooks/useTransactions.ts | 56 +------------------ 3 files changed, 12 insertions(+), 66 deletions(-) diff --git a/src/app/connections/create/[owner]/components/View/View.tsx b/src/app/connections/create/[owner]/components/View/View.tsx index 8a855ce1..d4c2208c 100644 --- a/src/app/connections/create/[owner]/components/View/View.tsx +++ b/src/app/connections/create/[owner]/components/View/View.tsx @@ -137,7 +137,7 @@ export const View = ({ params }: { params: Promise<{ owner: string }> }) => { onClick={handlePurchaseAlert} disabled={!!nameValidationError} > - Purchase Connection License + Create Connection License @@ -157,20 +157,17 @@ export const View = ({ params }: { params: Promise<{ owner: string }> }) => { >
- Purchase Connection License + Create Connection License

- Warning! By proceeding, you - are agreeing to approve payment of{' '} - $100 worth of $DIMO tokens - at market prices for your DIMO Connection License. If you do not have enough - $DIMO tokens in your account, you will be unable to create a Connection - License. + You are about to create a DIMO Connection License. This license allows you + to host a DIMO Oracle and connect vehicles to the DIMO network.

- You only need to purchase a license if you are planning on hosting a DIMO - Oracle. + You only need a connection license if you are planning on hosting a DIMO + Oracle. Once created, you'll receive the necessary credentials to + manage your connection.

@@ -195,7 +192,7 @@ export const View = ({ params }: { params: Promise<{ owner: string }> }) => { onClick={handleContinuePayment} disabled={isProcessingPayment} > - Continue with Payment + Create Connection
diff --git a/src/components/SpendingLimitModal/SpendingLimitModal.tsx b/src/components/SpendingLimitModal/SpendingLimitModal.tsx index 53c815a0..b0739e67 100644 --- a/src/components/SpendingLimitModal/SpendingLimitModal.tsx +++ b/src/components/SpendingLimitModal/SpendingLimitModal.tsx @@ -76,8 +76,7 @@ export const SpendingLimitModal: FC = ({ Set spending limit

- Approve the Developer License to spend $DIMO on your connected wallet, we - recommend approving more than $100 USD worth of $DIMO + Approve the Developer License to spend $DIMO on your connected wallet

diff --git a/src/hooks/useTransactions.ts b/src/hooks/useTransactions.ts index 1dbc2c4f..c452225e 100644 --- a/src/hooks/useTransactions.ts +++ b/src/hooks/useTransactions.ts @@ -8,7 +8,6 @@ import DimoCreditsABI from '@/contracts/DimoCreditABI.json'; import DimoConnectionABI from '@/contracts/DimoConnectionABI.json'; import { IDesiredTokenAmount, ITokenBalance } from '@/types/wallet'; import { utils } from 'web3'; -import { getCurrentDimoPrice } from '@/services/pricing'; const { CONTRACT_METHODS } = configuration; @@ -198,7 +197,7 @@ export const useMintLicense = () => { export const useMintConnection = () => { const { validateCurrentSession, currentUser } = useGlobalAccount(); - const { checkEnoughBalance, processTransactions } = useContractGA(); + const { processTransactions } = useContractGA(); return useCallback( async (connectionName: string) => { const nameBytes = new TextEncoder().encode(connectionName).length; @@ -211,40 +210,12 @@ export const useMintConnection = () => { } const currentSession = await validateCurrentSession(); - const enoughBalance = await checkEnoughBalance(); - - // Get current DIMO price and calculate required tokens for $100 USD - const dimoPrice = await getCurrentDimoPrice(); - const targetUsdAmount = 100; - // handle price fluctuations - const bufferPercentage = 0.05; - - // Calculate required DIMO tokens: $100 / DIMO price + 5% buffer for price flux. - const baseDimoAmount = targetUsdAmount / dimoPrice; - const requiredDIMO = baseDimoAmount * (1 + bufferPercentage); - const requiredDIMOInWei = BigInt(utils.toWei(requiredDIMO.toString(), 'ether')); if (!currentSession) throw new Error('Web3 connection failed'); if (!currentUser) throw new Error('User not found'); - if (!enoughBalance.dimo) { - return { - success: false, - reason: `Insufficient DIMO balance. You need at least ${requiredDIMO.toFixed(2)} DIMO tokens (approximately $${targetUsdAmount}) to mint a connection.`, - }; - } const transactions = [ - // Transaction 1: approve use of required $DIMO tokens ($100 USD worth + 5% buffer). - { - to: configuration.DC_ADDRESS, - value: BigInt(0), - data: encodeFunctionData({ - abi: DimoABI, - functionName: 'approve', - args: [configuration.DCC_ADDRESS, requiredDIMOInWei], - }), - }, - // Transaction 2: mint a connection license + // Mint a connection license { to: configuration.DCC_ADDRESS, value: BigInt(0), @@ -254,16 +225,6 @@ export const useMintConnection = () => { args: [currentUser.smartContractAddress, connectionName], }), }, - // Transaction 3: approve use of 0 $DIMO tokens - { - to: configuration.DC_ADDRESS, - value: BigInt(0), - data: encodeFunctionData({ - abi: DimoABI, - functionName: 'approve', - args: [configuration.DCC_ADDRESS, BigInt(0)], - }), - }, ]; try { @@ -276,17 +237,6 @@ export const useMintConnection = () => { const errorMessage = (error as Error)?.message || (error as Error)?.toString() || 'Unknown error'; - if ( - errorMessage.includes('ERC20: transfer amount exceeds balance') || - errorMessage.includes('transfer amount exceeds balance') || - errorMessage.includes('insufficient balance') - ) { - return { - success: false, - reason: 'You do not have enough $DIMO to mint a connection.', - }; - } - if ( errorMessage.includes('NameAlreadyInUse') || errorMessage.includes('name already in use') @@ -309,6 +259,6 @@ export const useMintConnection = () => { throw error; } }, - [checkEnoughBalance, currentUser, processTransactions, validateCurrentSession], + [currentUser, processTransactions, validateCurrentSession], ); };