Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ NEXT_PUBLIC_FIAT_ON_RAMP=false
#NEXT_PUBLIC_FORK_CHAIN_ID=1
#NEXT_PUBLIC_FORK_URL_RPC="https://rpc.tenderly.co/fork/1234567"
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=
NEXT_PUBLIC_NARVAL_CLIENT_ID=
NEXT_PUBLIC_ENABLE_STAKING=true
NEXT_PUBLIC_ENABLE_GOVERNANCE=true
NEXT_PUBLIC_API_BASEURL=https://aave-api-v2.aave.com
Expand Down
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ NEXT_PUBLIC_FORK_BASE_CHAIN_ID=
NEXT_PUBLIC_FORK_CHAIN_ID=
NEXT_PUBLIC_FORK_URL_RPC=
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=
NEXT_PUBLIC_NARVAL_CLIENT_ID=
NEXT_PUBLIC_MIXPANEL=
NEXT_PUBLIC_FIAT_ON_RAMP=true
NEXT_PUBLIC_IS_CYPRESS_ENABLED=false
Expand Down
5 changes: 5 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ inputs:
description: wallet connect project id
required: false
default: ''
NEXT_PUBLIC_NARVAL_CLIENT_ID:
description: narval client id
required: false
default: ''
NEXT_PUBLIC_IS_CYPRESS_ENABLED:
description: enables cypress
required: false
Expand Down Expand Up @@ -83,4 +87,5 @@ runs:
NEXT_PUBLIC_MIXPANEL: '${{ inputs.NEXT_PUBLIC_MIXPANEL }}'
NEXT_PUBLIC_FIAT_ON_RAMP: 'false'
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: '${{ inputs.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID }}'
NEXT_PUBLIC_NARVAL_CLIENT_ID: '${{ inputs.NEXT_PUBLIC_NARVAL_CLIENT_ID }}'
NEXT_PUBLIC_IS_CYPRESS_ENABLED: '${{ inputs.NEXT_PUBLIC_IS_CYPRESS_ENABLED }}'
1 change: 1 addition & 0 deletions .github/workflows/build-test-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
NEXT_PUBLIC_MIXPANEL: ${{ secrets.NEXT_PUBLIC_MIXPANEL }}
NEXT_PUBLIC_FIAT_ON_RAMP: 'false'
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
NEXT_PUBLIC_NARVAL_CLIENT_ID: ${{ secrets.NEXT_PUBLIC_NARVAL_CLIENT_ID }}
NEXT_PUBLIC_IS_CYPRESS_ENABLED: ${{ matrix.build.cypress_enabled }}

- name: Upload artifacts
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
NEXT_PUBLIC_MIXPANEL: ${{ secrets.NEXT_PUBLIC_MIXPANEL }}
NEXT_PUBLIC_FIAT_ON_RAMP: 'false'
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
NEXT_PUBLIC_NARVAL_CLIENT_ID: ${{ secrets.NEXT_PUBLIC_NARVAL_CLIENT_ID }}
NEXT_PUBLIC_IS_CYPRESS_ENABLED: ${{ matrix.build.cypress_enabled }}

- name: Upload artifacts
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@mui/icons-material": "^5.10.14",
"@mui/lab": "5.0.0-alpha.103",
"@mui/material": "^5.10.9",
"@narval-xyz/connect": "1.0.1",
"@number-flow/react": "^0.5.10",
"@paraswap/sdk": "6.10.0",
"@safe-global/safe-apps-provider": "^0.18.4",
Expand Down
17 changes: 16 additions & 1 deletion src/ui-config/wagmiConfig.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { narval } from '@narval-xyz/connect/wagmi';
import { Emitter } from '@wagmi/core/internal';
import { getDefaultConfig } from 'connectkit';
import {
Expand Down Expand Up @@ -80,7 +81,7 @@ const connectorConfig = {
emitter: new Emitter(''),
};

const connectors = prodCkConfig.connectors
const baseConnectors = prodCkConfig.connectors
?.map((connector) => {
// initialize the connector with the emitter so we can access the id
const c = connector(connectorConfig);
Expand All @@ -104,6 +105,20 @@ const connectors = prodCkConfig.connectors
return 0;
});

const narvalConnector = process.env.NEXT_PUBLIC_NARVAL_CLIENT_ID
? narval({
config: {
clientId: process.env.NEXT_PUBLIC_NARVAL_CLIENT_ID,
},
// Must be injected, otherwise ConnectKit(v1.9.0) shows a "not installed" error message.
// Remove this once ConnectKit has a fix applied.
overrides: {
type: 'injected',
},
})
: undefined;
const connectors = narvalConnector ? [...(baseConnectors ?? []), narvalConnector] : baseConnectors;

const prodConfig = createConfig({
...prodCkConfig,
connectors,
Expand Down
32 changes: 32 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2978,6 +2978,14 @@
resolved "https://registry.yarnpkg.com/@multiformats/base-x/-/base-x-4.0.1.tgz#95ff0fa58711789d53aefb2590a8b7a4e715d121"
integrity sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw==

"@narval-xyz/connect@1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@narval-xyz/connect/-/connect-1.0.1.tgz#1ed281d6eb3a68dafb32de819ee71ae5059430ad"
integrity sha512-inXus1eycMjw2o+SkPIkyYC3Hi4OIlx25SMldx1Uof9vuzXx2tqW01t7cp0CAIkZRkHOsW2DolCMY+TiYi2r+g==
dependencies:
ox "^0.9.12"
zod "^4.3.6"

"@next/bundle-analyzer@^12.1.0":
version "12.3.4"
resolved "https://registry.yarnpkg.com/@next/bundle-analyzer/-/bundle-analyzer-12.3.4.tgz#37c587525288a3dea64213c991590532246e8bb8"
Expand Down Expand Up @@ -5024,6 +5032,11 @@ abitype@1.2.3, abitype@^1.2.3:
resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.2.3.tgz#bec3e09dea97d99ef6c719140bee663a329ad1f4"
integrity sha512-Ofer5QUnuUdTFsBRwARMoWKOH1ND5ehwYhJ3OJ/BQO+StkwQjHw0XyVh4vDttzHB7QOFhPHa/o413PJ82gU/Tg==

abitype@^1.0.9:
version "1.2.4"
resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.2.4.tgz#8aab72949bcad4107031862ae998e5bd20eec76e"
integrity sha512-dpKH+N27vRjarMVTFFkeY445VTKftzGWpL0FiT7xmVmzQRKazZexzC5uHG0f6XKsVLAuUlndnbGau6lRejClxg==

abort-controller@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392"
Expand Down Expand Up @@ -10987,6 +11000,20 @@ ox@0.6.9:
abitype "^1.0.6"
eventemitter3 "5.0.1"

ox@^0.9.12:
version "0.9.17"
resolved "https://registry.yarnpkg.com/ox/-/ox-0.9.17.tgz#2397301db419664602853ca292524805ec0df5c3"
integrity sha512-rKAnhzhRU3Xh3hiko+i1ZxywZ55eWQzeS/Q4HRKLx2PqfHOolisZHErSsJVipGlmQKHW5qwOED/GighEw9dbLg==
dependencies:
"@adraffy/ens-normalize" "^1.11.0"
"@noble/ciphers" "^1.3.0"
"@noble/curves" "1.9.1"
"@noble/hashes" "^1.8.0"
"@scure/bip32" "^1.7.0"
"@scure/bip39" "^1.6.0"
abitype "^1.0.9"
eventemitter3 "5.0.1"

p-limit@^2.0.0, p-limit@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
Expand Down Expand Up @@ -13691,6 +13718,11 @@ zod@3.22.4:
resolved "https://registry.yarnpkg.com/zod/-/zod-3.22.4.tgz#f31c3a9386f61b1f228af56faa9255e845cf3fff"
integrity sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==

zod@^4.3.6:
version "4.4.3"
resolved "https://registry.yarnpkg.com/zod/-/zod-4.4.3.tgz#b680f172885d18bbebf21a834ea25e55a1bbf356"
integrity sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==

zustand@5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/zustand/-/zustand-5.0.0.tgz#71f8aaecf185592a3ba2743d7516607361899da9"
Expand Down