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

use latest eth provider #513

Merged
merged 6 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
"typescript": "^5.0.4"
},
"packageManager": "yarn@3.5.0",
"stableVersion": "4.1.9-11"
"stableVersion": "4.1.9-12"
}
2 changes: 1 addition & 1 deletion packages/sdk-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@polkadot/api": "^10"
},
"dependencies": {
"@acala-network/types": "^6.0.0-34",
"@acala-network/types": "^6.0.4",
"@polkadot/api": "^10.9.1",
"bignumber.js": "^9.0.0",
"lodash": "^4.17.20"
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-homa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"dependencies": {
"@acala-network/sdk-core": "4.1.9-12",
"@acala-network/types": "^6.0.0-34",
"@acala-network/types": "^6.0.4",
"@polkadot/api": "^10.9.1",
"lodash": "^4.17.20",
"rxjs": "^7.8.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-loan/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"dependencies": {
"@acala-network/sdk": "4.1.9-12",
"@acala-network/types": "^6.0.0-34",
"@acala-network/types": "^6.0.4",
"@polkadot/api": "^10.9.1",
"lodash": "^4.17.20",
"rxjs": "^7.8.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-swap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dependencies": {
"@acala-network/sdk": "^4.1.9-12",
"@acala-network/sdk-core": "^4.1.9-12",
"@acala-network/types": "^6.0.0-34",
"@acala-network/types": "^6.0.4",
"@polkadot/api": "^10.9.1",
"rxjs": "^7.8.1"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
"homepage": "https://github.com/AcalaNetwork/acala.js",
"peerDependencies": {
"@acala-network/api": "^5",
"@acala-network/eth-providers": "~2.7.3",
"@acala-network/eth-providers": "~2.7.18",
"@polkadot/api": "^10",
"ethers": "~5.7.0"
},
"dependencies": {
"@acala-network/api": "^5.1.1",
"@acala-network/eth-providers": "~2.7.3",
"@acala-network/eth-providers": "~2.7.18",
"@acala-network/sdk-core": "4.1.9-12",
"@polkadot/api": "^10.9.1",
"axios": "^0.24.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/wallet/balance-adapter/acala.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class AcalaBalanceAdapter implements AcalaExpandBalanceAdapter {

private transformNative = (data: FrameSystemAccountInfo, token: Token) => {
const free = FN.fromInner(data.data.free.toString(), token.decimals);
const locked = FN.fromInner((data.data.miscFrozen || data.data.frozen).toString(), token.decimals);
const locked = FN.fromInner(((data.data as any).miscFrozen || data.data.frozen).toString(), token.decimals);
const reserved = FN.fromInner(data.data.reserved.toString(), token.decimals);
const available = free.sub(locked).max(FN.ZERO);

Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/src/wallet/vesting/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Option, Vec } from '@polkadot/types';
import {
OrmlVestingVestingSchedule,
PalletBalancesBalanceLock,
PolkadotPrimitivesV2PersistedValidationData
PolkadotPrimitivesV5PersistedValidationData
} from '@polkadot/types/lookup';
import { combineLatest, firstValueFrom, map, Observable } from 'rxjs';
import { TokenProvider } from '../token-provider/type';
Expand Down Expand Up @@ -36,7 +36,7 @@ export class Vesting {
params: [address]
}).observable;
// get parachain block api.query.parachainSystem.validationData()
const parachain$ = Storage.create<Option<PolkadotPrimitivesV2PersistedValidationData>>({
const parachain$ = Storage.create<Option<PolkadotPrimitivesV5PersistedValidationData>>({
api: this.api,
path: 'query.parachainSystem.validationData',
params: []
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/wallet/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export class Wallet implements BaseSDK {
const consumers = accountInfo.consumers.toBigInt();
const nativeFreeBalance = FN.fromInner(accountInfo.data.free.toString(), nativeToken.decimals);
const nativeLockedBalance = FN.fromInner(
(accountInfo.data.miscFrozen || accountInfo.data.frozen).toString(),
((accountInfo.data as any).miscFrozen || accountInfo.data.frozen).toString(),
nativeToken.decimals
);
const isDefaultFee = forceToCurrencyName(feeToken) === nativeToken.name;
Expand Down
4 changes: 2 additions & 2 deletions packages/wormhole-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"homepage": "https://github.com/AcalaNetwork/acala.js",
"peerDependencies": {
"@acala-network/api": "^5",
"@acala-network/eth-providers": "~2.7.3",
"@acala-network/eth-providers": "~2.7.18",
"@polkadot/api": "^10",
"ethers": "~5.7.0"
},
"dependencies": {
"@acala-network/api": "^5.1.1",
"@acala-network/eth-providers": "~2.7.3",
"@acala-network/eth-providers": "~2.7.18",
"@acala-network/sdk": "^4.1.9-12",
"@certusone/wormhole-sdk": "^0.5.0",
"@ethersproject/bignumber": "^5.7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function getTxReceiptWithRetry(
attempts++;
await new Promise((resolve) => setTimeout(resolve, retryTimeout));
try {
result = await provider.getReceiptByHash(hash);
result = await provider.getReceipt(hash);
} catch (e) {
if (retryAttempts !== undefined && attempts > retryAttempts) {
throw e;
Expand Down
Loading
Loading