@@ -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