Skip to content

Commit ba6e22d

Browse files
authored
Update Bifrost Polkadot's accounts test suite (#590)
* Bump block numbers * Update Bifrost Polkadot's accounts test suite * Bump blocks numbers again
1 parent 56d4612 commit ba6e22d

4 files changed

Lines changed: 33 additions & 33 deletions

File tree

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
ASSETHUBKUSAMA_BLOCK_NUMBER=15305629
2-
BASILISK_BLOCK_NUMBER=13800921
3-
BIFROSTKUSAMA_BLOCK_NUMBER=13311253
4-
BRIDGEHUBKUSAMA_BLOCK_NUMBER=7947584
5-
CORETIMEKUSAMA_BLOCK_NUMBER=4882966
6-
ENCOINTERKUSAMA_BLOCK_NUMBER=13181273
7-
KARURA_BLOCK_NUMBER=11313701
8-
KUSAMA_BLOCK_NUMBER=32994193
9-
MOONRIVER_BLOCK_NUMBER=15795614
10-
PEOPLEKUSAMA_BLOCK_NUMBER=8545260
11-
SHIDEN_BLOCK_NUMBER=14353488
1+
ASSETHUBKUSAMA_BLOCK_NUMBER=15574522
2+
BASILISK_BLOCK_NUMBER=13861581
3+
BIFROSTKUSAMA_BLOCK_NUMBER=13405501
4+
BRIDGEHUBKUSAMA_BLOCK_NUMBER=7994810
5+
CORETIMEKUSAMA_BLOCK_NUMBER=4930183
6+
ENCOINTERKUSAMA_BLOCK_NUMBER=13264547
7+
KARURA_BLOCK_NUMBER=11360932
8+
KUSAMA_BLOCK_NUMBER=33088991
9+
MOONRIVER_BLOCK_NUMBER=15883530
10+
PEOPLEKUSAMA_BLOCK_NUMBER=8639534
11+
SHIDEN_BLOCK_NUMBER=14431788
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
ACALA_BLOCK_NUMBER=10854087
2-
ASSETHUBPOLKADOT_BLOCK_NUMBER=14279589
3-
ASTAR_BLOCK_NUMBER=12911507
4-
BIFROSTPOLKADOT_BLOCK_NUMBER=11771423
5-
BRIDGEHUBPOLKADOT_BLOCK_NUMBER=7393319
6-
COLLECTIVESPOLKADOT_BLOCK_NUMBER=8599225
7-
CORETIMEPOLKADOT_BLOCK_NUMBER=3985013
8-
HYDRATION_BLOCK_NUMBER=12008996
9-
MOONBEAM_BLOCK_NUMBER=15123101
10-
PEOPLEPOLKADOT_BLOCK_NUMBER=4320323
11-
POLKADOT_BLOCK_NUMBER=30696137
1+
ACALA_BLOCK_NUMBER=10902025
2+
ASSETHUBPOLKADOT_BLOCK_NUMBER=14533018
3+
ASTAR_BLOCK_NUMBER=12990763
4+
BIFROSTPOLKADOT_BLOCK_NUMBER=11857098
5+
BRIDGEHUBPOLKADOT_BLOCK_NUMBER=7440339
6+
COLLECTIVESPOLKADOT_BLOCK_NUMBER=8646902
7+
CORETIMEPOLKADOT_BLOCK_NUMBER=4031499
8+
HYDRATION_BLOCK_NUMBER=12083573
9+
MOONBEAM_BLOCK_NUMBER=15213256
10+
PEOPLEPOLKADOT_BLOCK_NUMBER=4364097
11+
POLKADOT_BLOCK_NUMBER=30792329

packages/polkadot/src/bifrostPolkadot.accounts.e2e.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const depositActions = [
3737
]
3838

3939
const accountsCfg = createAccountsConfig({
40-
expectation: 'failure',
40+
expectation: 'success',
4141
actions: {
4242
reserveActions: createDefaultReserveActions(),
4343
lockActions,

packages/shared/src/accounts.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ function findExplicitBurnEventsForAccount(
8989
address: string,
9090
chain: Chain<any, any>,
9191
): FrameSystemEventRecord[] {
92-
const isBifrostKusama = chain.name === 'bifrostKusama'
92+
const isBifrost = chain.name === 'bifrostKusama' || chain.name === 'bifrostPolkadot'
9393
const encoded = encodeAddress(address, client.config.properties.addressEncoding)
9494

9595
const feeAmounts = new Set<bigint>()
96-
if (isBifrostKusama) {
96+
if (isBifrost) {
9797
const feeInfos = client.config.properties.feeExtractor(events as unknown as any[], client.api)
9898
for (const fi of feeInfos) {
9999
if (fi.who === encoded) feeAmounts.add(fi.actualFee)
@@ -845,8 +845,8 @@ async function transferAllowDeathNoKillTest<
845845
expect(transferEventData.to.toString()).toBe(encodeAddress(bob.address, client.config.properties.addressEncoding))
846846
expect(transferEventData.amount.toBigInt()).toBe(transferAmount)
847847

848-
// On Bifrost Kusama, fees emit Burned (not Withdraw) events. Skip Withdraw check there.
849-
if (chain.name !== 'bifrostKusama') {
848+
// On Bifrost networks, fees emit Burned (not Withdraw) events. Skip Withdraw check there.
849+
if (chain.name !== 'bifrostKusama' && chain.name !== 'bifrostPolkadot') {
850850
const withdrawEvent = events.find((record) => {
851851
const { event } = record
852852
if (event.section === 'balances' && event.method === 'Withdraw') {
@@ -4439,10 +4439,10 @@ export const accountsE2ETests = <
44394439
label: 'self-transfer of entire balance',
44404440
testFn: () => transferAllowDeathSelfTest(chain),
44414441
},
4442-
// TODO: Bifrost Kusama's FlexibleFee rejects txs that would leave balance below ED after fees.
4442+
// TODO: Bifrost's FlexibleFee rejects txs that would leave balance below ED after fees.
44434443
// See https://github.com/bifrost-io/bifrost/blob/develop/pallets/flexible-fee/src/lib.rs
44444444
// Introduced in v0.22.0 (#1863): `can_withdraw` only matches `WithdrawConsequence::Success`.
4445-
...(chain.name === 'bifrostKusama'
4445+
...(chain.name === 'bifrostKusama' || chain.name === 'bifrostPolkadot'
44464446
? []
44474447
: [
44484448
{
@@ -4535,8 +4535,8 @@ export const accountsE2ETests = <
45354535
label: 'transfer all with keepAlive true leaves 1 ED',
45364536
testFn: () => transferAllKeepAliveTrueTest(chain),
45374537
},
4538-
// TODO: same Bifrost Kusama FlexibleFee issue as above — see v0.22.0 (#1863)
4539-
...(chain.name === 'bifrostKusama'
4538+
// TODO: same Bifrost FlexibleFee issue as above — see v0.22.0 (#1863)
4539+
...(chain.name === 'bifrostKusama' || chain.name === 'bifrostPolkadot'
45404540
? []
45414541
: [
45424542
{
@@ -4645,8 +4645,8 @@ export const accountsE2ETests = <
46454645
label: 'burning entire balance, or more than it, fails',
46464646
testFn: () => burnDoubleAttemptTest(chain),
46474647
},
4648-
// TODO: same Bifrost Kusama FlexibleFee issue as above — see v0.22.0 (#1863)
4649-
...(chain.name === 'bifrostKusama'
4648+
// TODO: same Bifrost FlexibleFee issue as above — see v0.22.0 (#1863)
4649+
...(chain.name === 'bifrostKusama' || chain.name === 'bifrostPolkadot'
46504650
? []
46514651
: [
46524652
{

0 commit comments

Comments
 (0)