Skip to content

Commit 462ee12

Browse files
authored
Merge pull request #26 from hyperweb-io/package-removals
Package removals
2 parents 4775cf6 + efb8dc6 commit 462ee12

File tree

12 files changed

+21253
-27205
lines changed

12 files changed

+21253
-27205
lines changed

examples/ibc-asset-list/components/asset-list/RowTransferModal.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ const TransferModalBody = (
160160

161161
const destChain = useMemo(() => {
162162
return {
163-
symbol: destChainInfo.chainName.toUpperCase(),
164-
name: destChainInfo.prettyName,
163+
symbol: destChainInfo?.chainName.toUpperCase(),
164+
name: destChainInfo?.prettyName,
165165
address: destAddress ?? '',
166166
imgSrc: chains.find(c => c.chainName === destChainName)?.logoURIs?.png
167167
};

examples/ibc-asset-list/components/common/Header.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { dependencies } from '@/config';
44

55
const stacks = ['Interchain Kit', 'Next.js'];
66

7-
const osmojs = dependencies[0];
7+
const interchainjs = dependencies[0];
88

99
export function Header() {
1010
const { theme, setTheme } = useTheme();
@@ -55,14 +55,14 @@ export function Header() {
5555
{' + '}
5656

5757
<Link
58-
href={osmojs.name}
58+
href={interchainjs.name}
5959
target="_blank"
6060
rel="noreferrer"
6161
attributes={{
6262
fontSize: { mobile: '$4xl', tablet: '$8xl', desktop: '$8xl' },
6363
}}
6464
>
65-
{osmojs.name}
65+
{interchainjs.name}
6666
</Link>
6767
</Text>
6868
</Text>

examples/ibc-asset-list/package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"@chain-registry/assets": "^1.70.32",
2222
"@chain-registry/types": "^0.50.13",
2323
"@chain-registry/v2": "^1.71.132",
24-
"@cosmjs/stargate": "^0.32.3",
2524
"@emotion/react": "11.10.6",
2625
"@emotion/styled": "11.10.6",
2726
"@interchain-kit/core": "0.2.205",
@@ -41,7 +40,6 @@
4140
"interchain-react": "1.7.3",
4241
"match-sorter": "^6.3.3",
4342
"next": "^13",
44-
"osmo-query": "16.5.1",
4543
"react": "18.3.1",
4644
"react-dom": "18.3.1",
4745
"react-icons": "^4.12.0"
@@ -57,4 +55,4 @@
5755
"typescript": "^5.1.6"
5856
},
5957
"packageManager": "[email protected]"
60-
}
58+
}

examples/injective-vue/package.json

+2-6
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
"dependencies": {
1212
"@chain-registry/v2": "^1.71.44",
1313
"@chain-registry/v2-types": "^0.53.20",
14-
"@cosmjs/amino": "^0.32.4",
15-
"@cosmjs/stargate": "^0.32.4",
1614
"@interchain-kit/core": "0.0.1-beta.39",
1715
"@interchain-kit/keplr-extension": "0.0.1-beta.39",
1816
"@interchain-kit/leap-extension": "0.0.1-beta.39",
@@ -23,7 +21,6 @@
2321
"@interchainjs/vue": "1.8.1",
2422
"@tanstack/vue-query": "5.62.7",
2523
"bignumber.js": "9.1.0",
26-
"osmojs": "^16.15.0",
2724
"vue": "^3.5.13",
2825
"vue-router": "^4.5.0"
2926
},
@@ -33,6 +30,5 @@
3330
"typescript": "~5.6.2",
3431
"vite": "^6.0.0",
3532
"vue-tsc": "^2.1.10"
36-
},
37-
"packageManager": "[email protected]"
38-
}
33+
}
34+
}

examples/injective-vue/src/components/asset-list/common/header.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { Link, Text, Box, Container, Button, Icon } from '@interchain-ui/vue';
33
import { dependencies } from '@/config/asset-list/features'
44
const stacks = ['Interchain Kit', 'Vue'];
5-
const osmojs = dependencies[0];
5+
const interchainjs = dependencies[0];
66
77
</script>
88

@@ -26,10 +26,10 @@ const osmojs = dependencies[0];
2626
<Text as="span" :fontSize="{ mobile: '$4xl', tablet: '$8xl', desktop: '$8xl' }" color="$primary500">
2727
{{ stacks.join(' + ') }}
2828
<!-- {{ ' + ' }}
29-
<Link :href="osmojs.name" target="_blank" rel="noreferrer" :attributes="{
29+
<Link :href="interchainjs.name" target="_blank" rel="noreferrer" :attributes="{
3030
fontSize: { mobile: '$4xl', tablet: '$8xl', desktop: '$8xl' },
3131
}">
32-
{{ osmojs.name }}
32+
{{ interchainjs.name }}
3333
</Link> -->
3434
</Text>
3535
</Text>

examples/injective-vue/src/components/asset-list/transfer-modal-body.vue

+25-28
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,13 @@ import BigNumber from 'bignumber.js'
77
import { useChainUtils } from '../../composables/common/useChainUtils';
88
import { IProps } from './row-transfer-modal.vue';
99
import AssetWithdrawTokens from './asset-withdraw-tokens.vue';
10-
import { coins, StdFee } from '@cosmjs/amino';
11-
import { ibc, cosmos } from 'osmojs';
10+
import { StdFee } from '@interchainjs/cosmos-types/types';
1211
import { useStargateClient } from '../../composables/common/useStargateClient';
13-
14-
const {
15-
transfer
16-
} = ibc.applications.transfer.v1.MessageComposer.withTypeUrl
12+
import { MsgTransfer } from 'interchainjs/ibc/applications/transfer/v1/tx';
1713
1814
interface IBodyProps extends IProps {
1915
inputValue: string
20-
}
16+
}
2117
2218
const props = defineProps<IBodyProps>()
2319
const emits = defineEmits<{
@@ -53,8 +49,8 @@ const availableAmount = computed(() => {
5349
if (!isDeposit.value) return transferToken.value.available ?? 0
5450
console.log('transferInfo.token', props.transferInfo.token)
5551
return new BigNumber(
56-
convRawToDispAmount(props.transferInfo.token.symbol, balance.value?.amount || '0')
57-
).toNumber();
52+
convRawToDispAmount(props.transferInfo.token.symbol, balance.value?.amount || '0')
53+
).toNumber();
5854
})
5955
6056
const dollarValue = computed(() => {
@@ -67,10 +63,10 @@ const dollarValue = computed(() => {
6763
const sourceChain = computed(() => {
6864
const logo_URIs = getChainLogo(sourceChainName.value)
6965
return {
70-
name: sourceChainInfo.value.prettyName,
71-
address: sourceAddress.value ?? '',
72-
imgSrc: logo_URIs?.png || logo_URIs?.svg || '',
73-
};
66+
name: sourceChainInfo.value.prettyName,
67+
address: sourceAddress.value ?? '',
68+
imgSrc: logo_URIs?.png || logo_URIs?.svg || '',
69+
};
7470
})
7571
7672
const destChain = computed(() => {
@@ -83,18 +79,21 @@ const destChain = computed(() => {
8379
};
8480
})
8581
86-
const handleSubmitTransfer = async() => {
82+
const handleSubmitTransfer = async () => {
8783
if (!sourceAddress.value || !destAddress.value) return;
8884
const transferAmount = new BigNumber(props.inputValue)
8985
.shiftedBy(getExponentByDenom(symbolToDenom(transferToken.value.symbol)))
9086
.toString();
91-
const { sourcePort, sourceChannel } = getIbcInfo(
87+
const { sourcePort, sourceChannel } = getIbcInfo(
9288
sourceChainName.value,
9389
destChainName.value
9490
);
9591
9692
const fee: StdFee = {
97-
amount: coins('1000', transferToken.value.denom ?? ''),
93+
amount: [{
94+
denom: transferToken.value.denom ?? '',
95+
amount: '1000'
96+
}],
9897
gas: '250000',
9998
};
10099
@@ -112,16 +111,19 @@ const handleSubmitTransfer = async() => {
112111
113112
let res = await sourceStargazeClient.value.signAndBroadcast(
114113
sourceAddress.value,
115-
[transfer({
116-
sourcePort,
114+
[{
115+
typeUrl: MsgTransfer.typeUrl,
116+
value: MsgTransfer.fromPartial({
117+
sourcePort,
117118
sourceChannel,
119+
token,
118120
sender: sourceAddress.value,
119121
receiver: destAddress.value,
120-
token,
121-
// @ts-ignore
122122
timeoutHeight: undefined,
123123
timeoutTimestamp: BigInt(timeoutInNanos),
124-
})],
124+
memo: '',
125+
}),
126+
}],
125127
fee
126128
)
127129
console.log('res>>', res)
@@ -132,13 +134,8 @@ const handleSubmitTransfer = async() => {
132134
</script>
133135

134136
<template>
135-
<AssetWithdrawTokens
136-
:fromImgSrc="sourceChain.imgSrc"
137-
:fromAddress="sourceChain.address"
138-
:toImgSrc="destChain.imgSrc"
139-
:toAddress="destChain.address"
140-
@onTransfer="handleSubmitTransfer"
141-
/>
137+
<AssetWithdrawTokens :fromImgSrc="sourceChain.imgSrc" :fromAddress="sourceChain.address" :toImgSrc="destChain.imgSrc"
138+
:toAddress="destChain.address" @onTransfer="handleSubmitTransfer" />
142139
</template>
143140

144141
<style scoped></style>

examples/injective-vue/src/composables/common/useChainUtils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useWalletManager } from '@interchain-kit/vue'
44
import { useAssets } from './useAssets'
55
import { Asset } from '@chain-registry/types';
66
import { ibc } from 'chain-registry'
7-
import { Coin } from 'osmojs/cosmos/base/v1beta1/coin';
7+
import { Coin } from '@interchainjs/cosmos-types/types';
88
import BigNumber from 'bignumber.js'
99
import { CoinDenom, CoinSymbol, Exponent, PriceHash } from '../../utils/asset-list/types';
1010

examples/injective-vue/src/composables/common/useStargateClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Ref, computed, ref, watch } from 'vue'
22
import { ExtensionWallet } from '@interchain-kit/core'
33
import { useChain, useWalletManager } from '@interchain-kit/vue'
4-
import { SigningStargateClient } from '@cosmjs/stargate'
4+
import { SigningClient as SigningStargateClient } from '@interchainjs/cosmos/signing-client';
55

66
export const useStargateClient = (chainName: Ref<string>) => {
77
const { rpcEndpoint, chain } = useChain(chainName)

examples/stake-tokens/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"chain-registry": "^1.69.32",
2828
"fast-fuzzy": "1.12.0",
2929
"interchain-kit": "0.0.1-beta.62",
30-
"interchain-query": "1.10.1",
3130
"match-sorter": "^6.3.3",
3231
"next": "^13",
3332
"react": "18.3.1",
@@ -45,4 +44,4 @@
4544
"typescript": "^5.5.4"
4645
},
4746
"packageManager": "[email protected]"
48-
}
47+
}

examples/vote-proposal/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"fast-fuzzy": "1.12.0",
3232
"framer-motion": "9.0.7",
3333
"interchain-kit": "0.0.1-beta.62",
34-
"interchain-query": "1.10.1",
3534
"match-sorter": "^6.3.3",
3635
"next": "^13",
3736
"react": "^18.2.0",
@@ -51,4 +50,4 @@
5150
"typescript": "^5.1.6"
5251
},
5352
"packageManager": "[email protected]"
54-
}
53+
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@
4141
"type": "git",
4242
"url": "https://github.com/hyperweb-io/create-interchain-app"
4343
},
44-
"packageManager": "yarn@4.1.0"
44+
"packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
4545
}

0 commit comments

Comments
 (0)