Skip to content

Commit

Permalink
fix network info
Browse files Browse the repository at this point in the history
  • Loading branch information
LukassF committed Sep 19, 2024
1 parent 9ec26b6 commit f95243c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sdk/apps/modal-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@nightlylabs/nightly-connect-polkadot": "0.0.16",
"@nightlylabs/nightly-connect-solana": "0.0.29",
"@nightlylabs/nightly-connect-sui": "0.1.0",
"@nightlylabs/wallet-selector-aptos": "0.1.8",
"@nightlylabs/wallet-selector-aptos": "0.1.9",
"@nightlylabs/wallet-selector-base": "^0.4.1",
"@nightlylabs/wallet-selector-polkadot": "0.2.7",
"@nightlylabs/wallet-selector-solana": "0.3.6",
Expand Down
2 changes: 1 addition & 1 deletion sdk/packages/selector-aptos/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nightlylabs/wallet-selector-aptos",
"version": "0.1.8",
"version": "0.1.9",
"description": "",
"type": "module",
"exports": {
Expand Down
6 changes: 5 additions & 1 deletion sdk/packages/selector-aptos/src/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,11 @@ export class NightlyConnectAptosAdapter extends EventEmitter<AptosAdapterEvents>
throw new Error('Not connected')
}
if (this._connectionType === ConnectionType.Nightly) {
return await this._app!.changeNetwork(networkInfo)
const response = await this._app!.changeNetwork(networkInfo)
if (response.status === UserResponseStatus.APPROVED) {
this._networkInfo = networkInfo
}
return response
}
if (this._connectionType === ConnectionType.WalletStandard) {
return await this._innerStandardAdapter!.features['aptos:changeNetwork']!.changeNetwork(
Expand Down

0 comments on commit f95243c

Please sign in to comment.