Skip to content

Commit 6e02a86

Browse files
committed
fix: incorrect wallet ref
1 parent ee1a421 commit 6e02a86

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/core/systems/ClientSolana.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,17 @@ export class ClientSolana extends System {
6767

6868
async onDepositRequest({ depositId, serializedTx }) {
6969
// console.log('onDepositRequest', { depositId, serializedTx })
70-
const player = this.world.entities.player
7170
const tx = Transaction.from(Buffer.from(serializedTx, 'base64'))
72-
const signedTx = await player.wallet.signTransaction(tx)
71+
const signedTx = await this.wallet.signTransaction(tx)
7372
const serializedSignedTx = Buffer.from(signedTx.serialize()).toString('base64')
7473
this.world.network.send('depositResponse', { depositId, serializedSignedTx })
7574
// console.log('depositResponse', { depositId, serializedSignedTx })
7675
}
7776

7877
async onWithdrawRequest({ withdrawId, serializedTx }) {
7978
// console.log('onWithdrawRequest', { withdrawId, serializedTx })
80-
const player = this.world.entities.player
8179
const tx = Transaction.from(Buffer.from(serializedTx, 'base64'))
82-
const signedTx = await player.wallet.signTransaction(tx)
80+
const signedTx = await this.wallet.signTransaction(tx)
8381
const serializedSignedTx = Buffer.from(signedTx.serialize({ requireAllSignatures: false })).toString('base64')
8482
this.world.network.send('withdrawResponse', { withdrawId, serializedSignedTx })
8583
// console.log('withdrawResponse', { withdrawId, serializedSignedTx })

0 commit comments

Comments
 (0)