Skip to content

Commit 257f0a2

Browse files
authored
fix: signature error (#230)
* fix: support checkmetadataHash * fix: balances.transfer is deprecated * fix: update icons
1 parent 4e11c15 commit 257f0a2

File tree

10 files changed

+239
-48
lines changed

10 files changed

+239
-48
lines changed

package-lock.json

Lines changed: 223 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@fortawesome/fontawesome-svg-core": "^1.2.35",
2929
"@fortawesome/free-solid-svg-icons": "^5.15.3",
3030
"@fortawesome/react-fontawesome": "^0.1.14",
31-
"@polkadot/api": "7.5.1",
31+
"@subscan/multisig-polkadot-types": "7.5.2",
3232
"@polkadot/api-contract": "7.5.1",
3333
"@polkadot/apps-config": "0.102.1",
3434
"@polkadot/extension-dapp": "0.42.2",
@@ -135,7 +135,13 @@
135135
},
136136
"resolutions": {
137137
"@polkadot/types": "7.5.1",
138-
"@polkadot/util": "8.3.3"
138+
"@polkadot/util": "8.3.3",
139+
"@polkadot/util-crypto": "8.3.3"
140+
},
141+
"overrides": {
142+
"@polkadot/types": "7.5.1",
143+
"@polkadot/util": "8.3.3",
144+
"@polkadot/util-crypto": "8.3.3"
139145
},
140146
"browserslist": {
141147
"production": [

public/favicon.ico

-1.21 KB
Binary file not shown.

public/logo192.png

1.37 KB
Loading

public/logo512.png

9.2 KB
Loading

public/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"short_name": "React App",
3-
"name": "Create React App Sample",
2+
"short_name": "Subscan Multisig",
3+
"name": "Subscan Multisig",
44
"icons": [
55
{
66
"src": "favicon.ico",

src/components/WalletState.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@ export function WalletState(props: WalletStateProps) {
5050
}, [network, networkConfig]);
5151

5252
const showTransferButton = useMemo(() => {
53-
return (
54-
isFunction(api?.tx?.balances?.transfer) &&
55-
isFunction(api?.tx?.balances?.transferKeepAlive) &&
56-
isFunction(api?.tx?.balances?.transferAll)
57-
);
53+
return isFunction(api?.tx?.balances?.transferKeepAlive) && isFunction(api?.tx?.balances?.transferAll);
5854
}, [api]);
5955

6056
const states = useMemo<{ label: string; count: number | undefined }[]>(() => {

src/components/modals/Transfer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ function Transfer({
207207
? api.tx.balances?.transferAll
208208
: isProtected
209209
? api.tx.balances?.transferKeepAlive
210-
: api.tx.balances?.transfer;
210+
: api.tx.balances?.transferAllowDeath;
211211

212212
if (!fn || !propSenderId) {
213213
setMultisigExtrinsic(null);

src/packages/react-signer/src/PaymentInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function PaymentInfo({ accountId, className = '', extrinsic }: Props): React.Rea
5757

5858
const isFeeError =
5959
api.consts.balances &&
60-
!api.tx.balances?.transfer.is(extrinsic) &&
60+
!api.tx.balances?.transferKeepAlive.is(extrinsic) &&
6161
balances?.accountId.eq(accountId) &&
6262
(balances.availableBalance.lte(dispatchInfo.partialFee) ||
6363
balances.freeBalance.sub(dispatchInfo.partialFee).lte(api.consts.balances.existentialDeposit as unknown as BN));

tsconfig.paths.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
"@polkadot/react-query": ["src/packages/react-query/src"],
1414
"@polkadot/react-query/*": ["src/packages/react-query/src/*"],
1515
"@polkadot/react-signer": ["src/packages/react-signer/src"],
16-
"@polkadot/react-signer/*": ["src/packages/react-signer/src/*"]
16+
"@polkadot/react-signer/*": ["src/packages/react-signer/src/*"],
17+
"@polkadot/types": ["node_modules/@subscan/multisig-polkadot-types"],
18+
"@polkadot/types/*": ["node_modules/@subscan/multisig-polkadot-types/*"]
1719
}
1820
}
1921
}

0 commit comments

Comments
 (0)