Skip to content

Commit

Permalink
chore(sdk): add support for Appkit options update
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshyx committed Jan 20, 2025
1 parent 781b0ec commit 72d124e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion libs/composedb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@akashaorg/composedb-models",
"version": "0.1.8",
"version": "0.1.9",
"type": "module",
"description": "ComposeDB models used in akasha-core",
"author": "AKASHA Foundation <hello@akasha.org> (https://akasha.org/)",
Expand Down
2 changes: 1 addition & 1 deletion libs/hooks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@akashaorg/ui-core-hooks",
"version": "0.1.2",
"version": "0.1.3",
"type": "module",
"description": "Reusable hooks for akasha-core",
"author": "AKASHA Foundation <hello@akasha.org> (https://akasha.org/)",
Expand Down
2 changes: 1 addition & 1 deletion libs/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@akashaorg/core-sdk",
"version": "0.1.14-alpha",
"version": "0.1.15-alpha",
"keywords": [
"web3",
"ethereum",
Expand Down
11 changes: 10 additions & 1 deletion libs/sdk/src/common/web3.connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import AWF_Config from './config';
import { AppKit, createAppKit } from '@reown/appkit';
import { EthersAdapter } from '@reown/appkit-adapter-ethers';
import { sepolia } from '@reown/appkit/networks';
import type { ConnectMethod } from '@reown/appkit-core';
import type { ConnectMethod, OptionsControllerState } from '@reown/appkit-core';

@injectable()
class Web3Connector {
Expand Down Expand Up @@ -146,6 +146,15 @@ class Web3Connector {
this.#w3modal.setConnectMethodsOrder(connectionFeatures);
}

/**
* Updates the options of the reown AppKit instance/modal.
*
* @param config - A partial object of the OptionsControllerState type, containing the options to update.
*/
updateModalOptions(config: Partial<OptionsControllerState>) {
this.#w3modal.updateOptions(config);
}

/*
* Get the current Web3Modal theme
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/typings/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@akashaorg/typings",
"version": "0.1.9",
"version": "0.1.10",
"description": "akasha-core typings for development purpose",
"author": "AKASHA Foundation <hello@akasha.org> (https://akasha.org/)",
"type": "module",
Expand Down

0 comments on commit 72d124e

Please sign in to comment.