Skip to content

Commit ce4c6f9

Browse files
authored
chore: update packages and fix foreign assets problem (#1667)
1 parent a3a539b commit ce4c6f9

File tree

5 files changed

+2849
-2310
lines changed

5 files changed

+2849
-2310
lines changed

package.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,20 @@
5454
"@mui/icons-material": "^5.15.18",
5555
"@mui/lab": "^5.0.0-alpha.85",
5656
"@mui/material": "^5.8.3",
57-
"@polkadot/api": "^11.2.1",
58-
"@polkadot/api-augment": "^11.2.1",
59-
"@polkadot/api-base": "^11.2.1",
60-
"@polkadot/api-contract": "^11.2.1",
61-
"@polkadot/api-derive": "^11.2.1",
62-
"@polkadot/rpc-augment": "^11.2.1",
63-
"@polkadot/rpc-core": "^11.2.1",
64-
"@polkadot/rpc-provider": "^11.2.1",
65-
"@polkadot/types": "^11.2.1",
66-
"@polkadot/types-codec": "^11.2.1",
67-
"@polkadot/types-known": "^11.2.1",
68-
"@polkadot/types-support": "^11.2.1",
69-
"@polkadot/util": "^13.1.1",
70-
"@polkadot/util-crypto": "^13.1.1",
57+
"@polkadot/api": "^14.3.1",
58+
"@polkadot/api-augment": "^14.3.1",
59+
"@polkadot/api-base": "^14.3.1",
60+
"@polkadot/api-contract": "^14.3.1",
61+
"@polkadot/api-derive": "^14.3.1",
62+
"@polkadot/rpc-augment": "^14.3.1",
63+
"@polkadot/rpc-core": "^14.3.1",
64+
"@polkadot/rpc-provider": "^14.3.1",
65+
"@polkadot/types": "^14.3.1",
66+
"@polkadot/types-codec": "^14.3.1",
67+
"@polkadot/types-known": "^14.3.1",
68+
"@polkadot/types-support": "^14.3.1",
69+
"@polkadot/util": "^13.2.3",
70+
"@polkadot/util-crypto": "^13.2.3",
7171
"@polkagate/apps-config": "^0.140.7",
7272
"@substrate/connect": "^0.7.32",
7373
"@vaadin/icons": "^23.2.3",
@@ -117,15 +117,15 @@
117117
"webpack-bundle-analyzer": "^4.9.0"
118118
},
119119
"resolutions": {
120-
"@polkadot/api": "^11.2.1",
121-
"@polkadot/keyring": "^13.1.1",
122-
"@polkadot/networks": "^13.1.1",
123-
"@polkadot/types": "^11.2.1",
124-
"@polkadot/types-augment": "^11.2.1",
120+
"@polkadot/api": "^14.3.1",
121+
"@polkadot/keyring": "^13.2.3",
122+
"@polkadot/networks": "^13.2.3",
123+
"@polkadot/types": "^14.3.1",
124+
"@polkadot/types-augment": "^14.3.1",
125125
"@polkadot/ui-keyring": "^3.6.6",
126-
"@polkadot/util": "^13.1.1",
127-
"@polkadot/util-crypto": "^13.1.1",
128-
"@polkadot/x-fetch": "^13.1.1",
126+
"@polkadot/util": "^13.2.3",
127+
"@polkadot/util-crypto": "^13.2.3",
128+
"@polkadot/x-fetch": "^13.2.3",
129129
"babel-core": "^7.0.0-bridge.0",
130130
"safe-buffer": "^5.2.1",
131131
"typescript": "^5.3.3"

packages/extension-polkagate/src/components/ShowValue.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,22 @@
44
/**
55
* @description this component is used to show an account balance in some pages like contributeToCrowdloan
66
* */
7-
import type { BN } from '@polkadot/util';
87

98
import { Skeleton } from '@mui/material';
109
import React from 'react';
1110

1211
export interface Props {
13-
value: number | string | BN | null | undefined;
12+
value: number | string | null | undefined;
1413
height?: number;
1514
unit?: string;
1615
width?: string;
1716
}
1817

19-
export default function ShowValue ({ height = 20, unit, value, width = '90px' }: Props): React.ReactElement<Props> {
18+
export default function ShowValue ({ height = 20, unit = '', value, width = '90px' }: Props): React.ReactElement<Props> {
2019
return (
2120
<>
2221
{value !== undefined
23-
? <>
24-
{value}{' '}{unit}
25-
</>
22+
? <>{value}{' '}{unit}</>
2623
: <Skeleton
2724
animation='wave'
2825
height={height}

packages/extension-polkagate/src/fullscreen/stake/type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ export interface StakingInputs {
1515
pool?: MyPoolInfo,
1616
estimatedFee?: Balance;
1717
selectedValidators?: ValidatorInfo[],
18-
extraInfo?: Record<string, unknown>
18+
extraInfo?: Record<string, any>
1919
}

packages/extension-polkagate/src/util/utils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,14 +553,18 @@ export const decodeHexValues = (obj: unknown) => {
553553
return obj;
554554
}
555555

556-
const objAsRecord = { ...obj } as Record<string, unknown>;
556+
const objAsRecord = { ...obj } as Record<string, any>;
557557

558558
Object.keys(objAsRecord).forEach((key) => {
559559
if (typeof objAsRecord[key] === 'string' && objAsRecord[key].startsWith('0x')) {
560560
objAsRecord[key] = hexToString(objAsRecord[key]);
561561
}
562562
});
563563

564+
if ('interior' in objAsRecord && 'x1' in objAsRecord['interior']) {
565+
objAsRecord['interior'].x1 = [objAsRecord['interior'].x1];
566+
}
567+
564568
return objAsRecord;
565569
};
566570

0 commit comments

Comments
 (0)