Skip to content

Commit

Permalink
fix: ton provider (#264)
Browse files Browse the repository at this point in the history
* feat: fix ton version

* fix: lint

* chore: release version 2.1.23
  • Loading branch information
ByteZhang1024 authored Dec 10, 2024
1 parent b3d85c2 commit 8465574
Show file tree
Hide file tree
Showing 42 changed files with 173 additions and 168 deletions.
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/cross-inpage-provider-core",
"version": "2.1.22",
"version": "2.1.23",
"keywords": [
"cross-inpage-provider"
],
Expand Down Expand Up @@ -29,9 +29,9 @@
"build-version-info": "node ./scripts/buildVersionInfo.js"
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-errors": "2.1.22",
"@onekeyfe/cross-inpage-provider-events": "2.1.22",
"@onekeyfe/cross-inpage-provider-types": "2.1.22",
"@onekeyfe/cross-inpage-provider-errors": "2.1.23",
"@onekeyfe/cross-inpage-provider-events": "2.1.23",
"@onekeyfe/cross-inpage-provider-types": "2.1.23",
"events": "^3.3.0",
"lodash-es": "^4.17.21",
"ms": "^2.1.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/desktop/desktop-bridge-injected/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/desktop-bridge-injected",
"version": "2.1.22",
"version": "2.1.23",
"keywords": [
"cross-inpage-provider"
],
Expand Down Expand Up @@ -34,7 +34,7 @@
"electron": "^17.2.0"
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-core": "2.1.22",
"@onekeyfe/cross-inpage-provider-types": "2.1.22"
"@onekeyfe/cross-inpage-provider-core": "2.1.23",
"@onekeyfe/cross-inpage-provider-types": "2.1.23"
}
}
2 changes: 1 addition & 1 deletion packages/empty/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/cross-inpage-provider-empty",
"version": "2.1.22",
"version": "2.1.23",
"keywords": [
"cross-inpage-provider"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/errors/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/cross-inpage-provider-errors",
"version": "2.1.22",
"version": "2.1.23",
"keywords": [
"cross-inpage-provider"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/events/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/cross-inpage-provider-events",
"version": "2.1.22",
"version": "2.1.23",
"keywords": [
"cross-inpage-provider"
],
Expand Down
2 changes: 2 additions & 0 deletions packages/example/components/ApiForm/ApiButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ export const ApiButton = memo(({
field.name = label;
}, []);

// eslint-disable-next-line react-hooks/exhaustive-deps
const dependencyStates = availableDependencyFields?.map(fieldId => {
// eslint-disable-next-line react-hooks/rules-of-hooks
const [field] = useAtom(store.fieldsAtom(fieldId));
return {
id: fieldId,
Expand Down
2 changes: 1 addition & 1 deletion packages/example/components/ApiForm/ApiCombobox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const ApiCombobox = forwardRef<ApiComboboxRef, ApiComboboxProps>(function

useEffect(() => {
if (onRequestOptions) {
onRequestOptions().then((options) => {
void onRequestOptions().then((options) => {
setOptions(options);
});
}
Expand Down
1 change: 1 addition & 0 deletions packages/example/components/ApiForm/ApiForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export const ApiForm = forwardRef<ApiFormRef, ApiFormProps>(function ApiForm(
},
setField: (id: string, field: any) => {
const oldField = store.scope.get(store.fieldsAtom(id));
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
store.scope.set(store.fieldsAtom(id), {
...oldField,
...field
Expand Down
2 changes: 1 addition & 1 deletion packages/example/components/ApiForm/ApiSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const ApiSelector = forwardRef<ApiSelectorRef, ApiSelectorProps>(function

useEffect(() => {
if (onRequestOptions) {
onRequestOptions().then((options) => {
void onRequestOptions().then((options) => {
setOptions(options);
});
}
Expand Down
2 changes: 1 addition & 1 deletion packages/example/components/chains/conflux/example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const WalletWatchAsset = ({ chainId }: { chainId: string | undefined }) => {

useEffect(() => {
// https://testingcf.jsdelivr.net/gh/conflux-fans/token-list@master/cfx.fluent.json
axios.get('https://testingcf.jsdelivr.net/gh/conflux-fans/token-list@master/cfx.fluent.json').then((res) => {
void axios.get('https://testingcf.jsdelivr.net/gh/conflux-fans/token-list@master/cfx.fluent.json').then((res) => {
const tokens = res.data.tokens as {
chainId: number;
address: string;
Expand Down
7 changes: 4 additions & 3 deletions packages/example/components/chains/suiStandard/example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ function AssetInfoView({ viewRef, client }: { viewRef: ApiFormRef | undefined, c

useEffect(() => {
if (viewRef) {
(async () => {
void (async () => {
const coinInfo = await client.getCoinMetadata({ coinType: field.value });
viewRef?.setValue('assetInfo', `name: ${coinInfo?.name}, symbol: ${coinInfo?.symbol}, decimals: ${coinInfo?.decimals}`);
viewRef?.setValue('assetDecimals', coinInfo?.decimals);
})();
}
}, [field.value]);
}, [client, field.value, viewRef]);

return <></>
}
Expand Down Expand Up @@ -110,7 +110,7 @@ function TransferForm() {
useEffect(() => {
if (currentAccount && currentAccount?.address) {
apiFromRef.current?.setValue('to', currentAccount.address);
getCoins().then((coinTypes) => {
void getCoins().then((coinTypes) => {
const options = Array.from(coinTypes.keys()).map((key) => {
return {
label: key,
Expand All @@ -136,6 +136,7 @@ function TransferForm() {

const transfer = new TransactionBlock();

// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
const amountBN = new BigNumber(amount).shiftedBy(decimals);
const amountBNString = amountBN.toString();
console.log('amountBNString', amountBNString);
Expand Down
2 changes: 1 addition & 1 deletion packages/example/components/chains/tron/example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const WalletWatchAsset = memo(() => {
const { provider } = useWallet<IProviderApi>();

useEffect(() => {
okLinkRequest.getTokenList('TRON', 'TRC20').then((tokens) => {
void okLinkRequest.getTokenList('TRON', 'TRC20').then((tokens) => {
const tokenOptions = tokens.map((token) => ({
value: token.tokenContractAddress,
label: `${token.token} - ${token.tokenContractAddress}`,
Expand Down
1 change: 1 addition & 0 deletions packages/example/components/context/ContextFactory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export function createStore<T extends BaseStore>(initialState: T) {

const useFieldValue = <K extends keyof T>(field: K) => {
const Context = getFieldContext(field);
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return useContext(Context);
};

Expand Down
2 changes: 1 addition & 1 deletion packages/example/components/ui/command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Command = React.forwardRef<
))
Command.displayName = CommandPrimitive.displayName

interface CommandDialogProps extends DialogProps {}
type CommandDialogProps = DialogProps

const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
return (
Expand Down
24 changes: 12 additions & 12 deletions packages/example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/cross-inpage-provider-example",
"version": "2.1.22",
"version": "2.1.23",
"private": true,
"scripts": {
"postinstall": "patch-package",
Expand Down Expand Up @@ -28,17 +28,17 @@
"@metamask/onboarding": "^1.0.1",
"@mizuwallet-sdk/core": "^1.4.0",
"@mysten/dapp-kit": "0.13.2",
"@onekeyfe/cross-inpage-provider-core": "2.1.22",
"@onekeyfe/cross-inpage-provider-types": "2.1.22",
"@onekeyfe/onekey-aptos-provider": "2.1.22",
"@onekeyfe/onekey-cardano-provider": "2.1.22",
"@onekeyfe/onekey-conflux-provider": "2.1.22",
"@onekeyfe/onekey-cosmos-provider": "2.1.22",
"@onekeyfe/onekey-near-provider": "2.1.22",
"@onekeyfe/onekey-solana-provider": "2.1.22",
"@onekeyfe/onekey-sui-provider": "2.1.22",
"@onekeyfe/onekey-tron-provider": "2.1.22",
"@onekeyfe/onekey-webln-provider": "2.1.22",
"@onekeyfe/cross-inpage-provider-core": "2.1.23",
"@onekeyfe/cross-inpage-provider-types": "2.1.23",
"@onekeyfe/onekey-aptos-provider": "2.1.23",
"@onekeyfe/onekey-cardano-provider": "2.1.23",
"@onekeyfe/onekey-conflux-provider": "2.1.23",
"@onekeyfe/onekey-cosmos-provider": "2.1.23",
"@onekeyfe/onekey-near-provider": "2.1.23",
"@onekeyfe/onekey-solana-provider": "2.1.23",
"@onekeyfe/onekey-sui-provider": "2.1.23",
"@onekeyfe/onekey-tron-provider": "2.1.23",
"@onekeyfe/onekey-webln-provider": "2.1.23",
"@polkadot/api": "^9.11.3",
"@polkadot/extension-dapp": "^0.47.5",
"@radix-ui/react-checkbox": "^1.1.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/extension/extension-bridge-hosted/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/extension-bridge-hosted",
"version": "2.1.22",
"version": "2.1.23",
"keywords": [
"cross-inpage-provider"
],
Expand Down Expand Up @@ -28,8 +28,8 @@
"start": "tsc --watch"
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-core": "2.1.22",
"@onekeyfe/cross-inpage-provider-types": "2.1.22",
"@onekeyfe/cross-inpage-provider-core": "2.1.23",
"@onekeyfe/cross-inpage-provider-types": "2.1.23",
"uuid": "^8.3.2"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/extension/extension-bridge-injected/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/extension-bridge-injected",
"version": "2.1.22",
"version": "2.1.23",
"keywords": [
"cross-inpage-provider"
],
Expand Down Expand Up @@ -28,7 +28,7 @@
"start": "tsc --watch"
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-core": "2.1.22",
"@onekeyfe/cross-inpage-provider-types": "2.1.22"
"@onekeyfe/cross-inpage-provider-core": "2.1.23",
"@onekeyfe/cross-inpage-provider-types": "2.1.23"
}
}
14 changes: 7 additions & 7 deletions packages/injected/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/cross-inpage-provider-injected",
"version": "2.1.22",
"version": "2.1.23",
"keywords": [
"cross-inpage-provider"
],
Expand Down Expand Up @@ -42,12 +42,12 @@
"electron": "*"
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-core": "2.1.22",
"@onekeyfe/cross-inpage-provider-types": "2.1.22",
"@onekeyfe/desktop-bridge-injected": "2.1.22",
"@onekeyfe/extension-bridge-injected": "2.1.22",
"@onekeyfe/inpage-providers-hub": "2.1.22",
"@onekeyfe/native-bridge-injected": "2.1.22",
"@onekeyfe/cross-inpage-provider-core": "2.1.23",
"@onekeyfe/cross-inpage-provider-types": "2.1.23",
"@onekeyfe/desktop-bridge-injected": "2.1.23",
"@onekeyfe/extension-bridge-injected": "2.1.23",
"@onekeyfe/inpage-providers-hub": "2.1.23",
"@onekeyfe/native-bridge-injected": "2.1.23",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/native/native-bridge-injected/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/native-bridge-injected",
"version": "2.1.22",
"version": "2.1.23",
"keywords": [
"cross-inpage-provider"
],
Expand Down Expand Up @@ -28,7 +28,7 @@
"start": "tsc --watch"
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-core": "2.1.22",
"@onekeyfe/cross-inpage-provider-types": "2.1.22"
"@onekeyfe/cross-inpage-provider-core": "2.1.23",
"@onekeyfe/cross-inpage-provider-types": "2.1.23"
}
}
42 changes: 21 additions & 21 deletions packages/providers/inpage-providers-hub/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/inpage-providers-hub",
"version": "2.1.22",
"version": "2.1.23",
"keywords": [
"cross-inpage-provider"
],
Expand Down Expand Up @@ -30,26 +30,26 @@
"start": "tsc --watch"
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-core": "2.1.22",
"@onekeyfe/cross-inpage-provider-types": "2.1.22",
"@onekeyfe/onekey-algo-provider": "2.1.22",
"@onekeyfe/onekey-alph-provider": "2.1.22",
"@onekeyfe/onekey-aptos-provider": "2.1.22",
"@onekeyfe/onekey-bfc-provider": "2.1.22",
"@onekeyfe/onekey-btc-provider": "2.1.22",
"@onekeyfe/onekey-cardano-provider": "2.1.22",
"@onekeyfe/onekey-conflux-provider": "2.1.22",
"@onekeyfe/onekey-cosmos-provider": "2.1.22",
"@onekeyfe/onekey-eth-provider": "2.1.22",
"@onekeyfe/onekey-nostr-provider": "2.1.22",
"@onekeyfe/onekey-polkadot-provider": "2.1.22",
"@onekeyfe/onekey-private-provider": "2.1.22",
"@onekeyfe/onekey-scdo-provider": "2.1.22",
"@onekeyfe/onekey-solana-provider": "2.1.22",
"@onekeyfe/onekey-sui-provider": "2.1.22",
"@onekeyfe/onekey-ton-provider": "2.1.22",
"@onekeyfe/onekey-tron-provider": "2.1.22",
"@onekeyfe/onekey-webln-provider": "2.1.22",
"@onekeyfe/cross-inpage-provider-core": "2.1.23",
"@onekeyfe/cross-inpage-provider-types": "2.1.23",
"@onekeyfe/onekey-algo-provider": "2.1.23",
"@onekeyfe/onekey-alph-provider": "2.1.23",
"@onekeyfe/onekey-aptos-provider": "2.1.23",
"@onekeyfe/onekey-bfc-provider": "2.1.23",
"@onekeyfe/onekey-btc-provider": "2.1.23",
"@onekeyfe/onekey-cardano-provider": "2.1.23",
"@onekeyfe/onekey-conflux-provider": "2.1.23",
"@onekeyfe/onekey-cosmos-provider": "2.1.23",
"@onekeyfe/onekey-eth-provider": "2.1.23",
"@onekeyfe/onekey-nostr-provider": "2.1.23",
"@onekeyfe/onekey-polkadot-provider": "2.1.23",
"@onekeyfe/onekey-private-provider": "2.1.23",
"@onekeyfe/onekey-scdo-provider": "2.1.23",
"@onekeyfe/onekey-solana-provider": "2.1.23",
"@onekeyfe/onekey-sui-provider": "2.1.23",
"@onekeyfe/onekey-ton-provider": "2.1.23",
"@onekeyfe/onekey-tron-provider": "2.1.23",
"@onekeyfe/onekey-webln-provider": "2.1.23",
"web3": "^1.7.3"
},
"devDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions packages/providers/onekey-algo-provider/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/onekey-algo-provider",
"version": "2.1.22",
"version": "2.1.23",
"keywords": [
"cross-inpage-provider"
],
Expand Down Expand Up @@ -28,9 +28,9 @@
"start": "tsc --watch"
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-core": "2.1.22",
"@onekeyfe/cross-inpage-provider-errors": "2.1.22",
"@onekeyfe/cross-inpage-provider-types": "2.1.22",
"@onekeyfe/extension-bridge-injected": "2.1.22"
"@onekeyfe/cross-inpage-provider-core": "2.1.23",
"@onekeyfe/cross-inpage-provider-errors": "2.1.23",
"@onekeyfe/cross-inpage-provider-types": "2.1.23",
"@onekeyfe/extension-bridge-injected": "2.1.23"
}
}
10 changes: 5 additions & 5 deletions packages/providers/onekey-alph-provider/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/onekey-alph-provider",
"version": "2.1.22",
"version": "2.1.23",
"keywords": [
"cross-inpage-provider"
],
Expand Down Expand Up @@ -31,9 +31,9 @@
"@alephium/get-extension-wallet": "^1.5.2",
"@alephium/walletconnect-provider": "^1.5.2",
"@alephium/web3": "^1.5.2",
"@onekeyfe/cross-inpage-provider-core": "2.1.22",
"@onekeyfe/cross-inpage-provider-errors": "2.1.22",
"@onekeyfe/cross-inpage-provider-types": "2.1.22",
"@onekeyfe/extension-bridge-injected": "2.1.22"
"@onekeyfe/cross-inpage-provider-core": "2.1.23",
"@onekeyfe/cross-inpage-provider-errors": "2.1.23",
"@onekeyfe/cross-inpage-provider-types": "2.1.23",
"@onekeyfe/extension-bridge-injected": "2.1.23"
}
}
Loading

0 comments on commit 8465574

Please sign in to comment.