Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: wallet ts #83

Draft
wants to merge 30 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c52b833
refactor: wallet-ts
ThomasRalee Nov 28, 2024
037e5c4
chore: replace isEthWallet with isEvmWallet
shane-moore Dec 20, 2024
7a6e04c
chore: add wallet-cosmos-strategy to optimizeDeps
shane-moore Dec 26, 2024
8ffcb67
chore: remove unused file
ThomasRalee Jan 10, 2025
39f1611
chore: package bump
ThomasRalee Feb 3, 2025
3d7484d
chore: resolve merge conflicts
ThomasRalee Feb 3, 2025
b2c6fd8
Merge branch 'master' into refactor/wallet-ts
ThomasRalee Feb 6, 2025
9e9f503
Merge branch 'master' into refactor/wallet-ts
ThomasRalee Feb 13, 2025
2f677d8
Merge branch 'master' into refactor/wallet-ts
ThomasRalee Feb 18, 2025
0213716
chore: package bump
ThomasRalee Feb 19, 2025
e49af71
chore: package bump
ThomasRalee Feb 19, 2025
3c153a9
Merge branch 'master' into refactor/wallet-ts
ThomasRalee Feb 20, 2025
d771f89
chore: package bump
ThomasRalee Feb 20, 2025
dcf64d3
chore: remove torus
ThomasRalee Feb 20, 2025
ade965c
Merge branch 'master' into refactor/wallet-ts
ThomasRalee Feb 21, 2025
35f492c
chore: package bump
ivan-angjelkoski Feb 24, 2025
417d60a
feat: contract exec auth autosign
ivan-angjelkoski Feb 25, 2025
82be29d
chore: minor
ivan-angjelkoski Feb 25, 2025
dbcd268
chore: package bump
ThomasRalee Feb 25, 2025
30a4437
chore: disable autosign for contracts
ivan-angjelkoski Feb 26, 2025
8cdecab
chore: package version update for yarn generate issue fix
Frederick-88 Feb 26, 2025
0957510
Merge branch 'master' into refactor/wallet-ts
ThomasRalee Feb 26, 2025
c2268a9
chore: package bump
ThomasRalee Feb 26, 2025
4b54138
chore: remove unused file
ThomasRalee Feb 26, 2025
3ef11f9
chore: package bump
ThomasRalee Feb 28, 2025
0eeca53
chore: minor
ThomasRalee Feb 28, 2025
7ea908f
Merge branch 'master' into refactor/wallet-ts
ThomasRalee Feb 28, 2025
7cd9e0b
Merge branch 'master' into refactor/wallet-ts
ThomasRalee Mar 3, 2025
c6c3df9
chore: package bump
ThomasRalee Mar 3, 2025
0f8e95c
chore: add sharedStripTrillingZero helper function
ThomasRalee Mar 4, 2025
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
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn --cwd ./layer lint-staged
# yarn --cwd ./layer lint-staged
10 changes: 5 additions & 5 deletions layer/WalletService.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { MsgBroadcaster, Web3Broadcaster } from '@injectivelabs/wallet-ts'
import {
walletStrategy,
autoSignWalletStrategy
} from './wallet/wallet-strategy'
import { MsgBroadcaster, Web3Broadcaster } from '@injectivelabs/wallet-core'
import {
NETWORK,
ENDPOINTS,
ETHEREUM_CHAIN_ID,
FEE_PAYER_PUB_KEY
} from './utils/constant'
import {
walletStrategy,
autoSignWalletStrategy
} from './wallet/wallet-strategy'

// Transaction broadcaster
export const msgBroadcaster = new MsgBroadcaster({
Expand Down
4 changes: 4 additions & 0 deletions layer/components/Icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ const filteredAttrs = computed(() => {
const dynamicComponent = defineAsyncComponent<Record<string, unknown>>(() => {
let name = props.name

if (name.includes('trezor')) {
name = 'wallet/trezor'
}

if (name.includes('ledger-legacy')) {
name = 'wallet/ledger'
}
Expand Down
11 changes: 9 additions & 2 deletions layer/nuxt-config/vite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default defineConfig({
return 'keplr'
}

if (id.includes('@injectivelabs/wallet-ts')) {
if (id.includes('@injectivelabs/wallet')) {
return 'injective-wallet'
}

Expand Down Expand Up @@ -93,7 +93,14 @@ export default defineConfig({
'@injectivelabs/sdk-ts',
'qr-code-generator-vue3',
'class-variance-authority',
'@injectivelabs/wallet-ts',
'@injectivelabs/wallet-evm',
'@injectivelabs/wallet-base',
'@injectivelabs/wallet-core',
'@injectivelabs/wallet-ledger',
'@injectivelabs/wallet-cosmos',
'@injectivelabs/wallet-strategy',
'@injectivelabs/wallet-cosmostation',
'@injectivelabs/wallet-cosmos-strategy',
...(isLocalLayer ? [] : additionalDeps)
],
exclude: ['fsevents']
Expand Down
4 changes: 4 additions & 0 deletions layer/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export default defineNuxtConfig({

components: [{ path: resolve('./components'), prefix: 'Shared' }],

pinia: {
autoImports: ['defineStore']
},

modules: [
'@pinia/nuxt',
'@vueuse/nuxt',
Expand Down
27 changes: 20 additions & 7 deletions layer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,19 @@
"scripts": {
"prepare": "nuxi prepare",
"lint": "eslint .",
"postinstall": "yarn add https://github.com/InjectiveLabs/shared-packages#master --ignore-scripts && yarn prepare"
"postinstall": "yarn add https://github.com/InjectiveLabs/shared-packages#refactor/wallet-ts --ignore-scripts && yarn prepare"
},
"dependencies": {
"@nuxt/ui": "^2.18.7",
"@nuxtjs/i18n": "8.5.5",
"@vueuse/nuxt": "12.3.0",
"shared-packages": "https://github.com/InjectiveLabs/shared-packages#master"
"shared-packages": "https://github.com/InjectiveLabs/shared-packages#refactor/wallet-ts"
},
"devDependencies": {
"@bangjelkoski/vite-plugin-node-polyfills": "^0.0.2",
"@nuxt/eslint-config": "^0.1.1",
"@pinia/nuxt": "^0.4.11",
"@types/fs-extra": "^11.0.1",
"@types/node": "^20.4.9",
"eslint": "8.37.0",
"lint-staged": "13.2.3",
"nuxt": "3.13.2",
"typescript": "5.5.4",
"vite-tsconfig-paths": "^4.2.0"
},
Expand All @@ -35,6 +31,23 @@
"resolutions": {
"@solana/web3.js": "1.98.0",
"rpc-websockets": "9.0.4",
"crypto-js": "4.2.0"
"crypto-js": "4.2.0",
"@injectivelabs/utils": "1.14.41-alpha.7",
"@injectivelabs/networks": "1.14.41-alpha.2",
"@injectivelabs/ts-types": "1.14.41-alpha.2",
"@injectivelabs/exceptions": "1.14.41-alpha.1",
"@injectivelabs/sdk-ts": "1.14.41-alpha.16",
"@injectivelabs/wallet-base": "1.14.41-alpha.18",
"@injectivelabs/wallet-core": "1.14.41-alpha.18",
"@injectivelabs/wallet-cosmos": "1.14.41-alpha.18",
"@injectivelabs/wallet-cosmos-strategy": "1.14.41-alpha.18",
"@injectivelabs/wallet-cosmostation": "1.14.41-alpha.18",
"@injectivelabs/wallet-evm": "1.14.41-alpha.20",
"@injectivelabs/wallet-ledger": "1.14.41-alpha.18",
"@injectivelabs/wallet-magic": "1.14.41-alpha.18",
"@injectivelabs/wallet-private-key": "1.14.41-alpha.18",
"@injectivelabs/wallet-strategy": "1.14.41-alpha.20",
"@injectivelabs/wallet-trezor": "1.14.41-alpha.18",
"@injectivelabs/wallet-wallet-connect": "1.14.41-alpha.18"
}
}
5 changes: 5 additions & 0 deletions layer/store/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ export const useSharedJsonStore = defineStore('sharedJson', {
return
}

const data = await client.get('json/tokens/mainnet.json')

// eslint-disable-next-line no-console
console.log({ data })

sharedJsonStore.$patch({
tokens: await client.get('json/tokens/mainnet.json')
})
Expand Down
Loading