@@ -13,8 +13,8 @@ describe('Passkey Pallet Tests', function () {
13
13
let fundedKeys : KeyringPair ;
14
14
let receiverKeys : KeyringPair ;
15
15
16
- beforeEach ( async function ( ) {
17
- fundedKeys = await createAndFundKeypair ( fundingSource , 100_000_000n ) ;
16
+ before ( async function ( ) {
17
+ fundedKeys = await createAndFundKeypair ( fundingSource , 300_000_000n ) ;
18
18
receiverKeys = await createAndFundKeypair ( fundingSource ) ;
19
19
} ) ;
20
20
@@ -61,14 +61,14 @@ describe('Passkey Pallet Tests', function () {
61
61
it ( 'should transfer small balance from fundedKeys to receiverKeys' , async function ( ) {
62
62
const accountPKey = fundedKeys . publicKey ;
63
63
const nonce = await getNonce ( fundedKeys ) ;
64
- const transferCalls = ExtrinsicHelper . api . tx . balances . transferKeepAlive ( receiverKeys . publicKey , 100n ) ;
65
- const { passKeyPrivateKey, passKeyPublicKey, passkeySignature } = createPassKeyAndSignAccount ( accountPKey ) ;
64
+ const transferCalls = ExtrinsicHelper . api . tx . balances . transferKeepAlive ( receiverKeys . publicKey , 100_000_000n ) ;
65
+ const { passKeyPrivateKey, passKeyPublicKey } = createPassKeyAndSignAccount ( accountPKey ) ;
66
66
const accountSignature = fundedKeys . sign ( u8aWrapBytes ( passKeyPublicKey ) ) ;
67
67
const passkeyCall = await createPassKeyCall ( accountPKey , nonce , accountSignature , transferCalls ) ;
68
68
const passkeyPayload = await createPasskeyPayload ( passKeyPrivateKey , passKeyPublicKey , passkeyCall , false ) ;
69
69
const passkeyProxy = ExtrinsicHelper . executePassKeyProxy ( fundedKeys , passkeyPayload ) ;
70
70
assert . doesNotReject ( passkeyProxy . fundAndSendUnsigned ( fundingSource ) ) ;
71
- await ExtrinsicHelper . waitForFinalization ( ( await getBlockNumber ( ) ) + 1 ) ;
71
+ await ExtrinsicHelper . waitForFinalization ( ( await getBlockNumber ( ) ) + 2 ) ;
72
72
const receiverBalance = await ExtrinsicHelper . getAccountInfo ( receiverKeys . address ) ;
73
73
const nonceAfter = ( await ExtrinsicHelper . getAccountInfo ( fundedKeys . address ) ) . nonce . toNumber ( ) ;
74
74
assert . equal ( nonce + 1 , nonceAfter ) ;
0 commit comments