Skip to content

Commit

Permalink
Implement listGameAccounts in sui transport
Browse files Browse the repository at this point in the history
  • Loading branch information
DogLooksGood committed Jan 28, 2025
1 parent 8f61f0b commit e6f267e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion js/sdk-sui/src/sui-transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,14 @@ export class SuiTransport implements ITransport {
}

async listGameAccounts(addrs: string[]): Promise<GameAccount[]> {
return []
let ret = []
for (const addr of addrs) {
const gameAccount = await this.getGameAccount(addr)
if (gameAccount !== undefined) {
ret.push(gameAccount)
}
}
return ret
}

// todo sui and contract
Expand Down
2 changes: 2 additions & 0 deletions transport/src/solana.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,8 @@ impl TransportT for SolanaTransport {
let metadata_data = metadata_account_state.data;
let uri = metadata_data.uri.trim_end_matches('\0').to_string();

info!("Fetch wasm game bundle from {}", uri);

let data = nft::fetch_wasm_from_game_bundle(&uri)
.await
.map_err(|e| TransportError::NetworkError(e.to_string()))?;
Expand Down

0 comments on commit e6f267e

Please sign in to comment.