Skip to content

Commit

Permalink
fixes and new version
Browse files Browse the repository at this point in the history
  • Loading branch information
NorbertBodziony committed Oct 20, 2023
1 parent c72790d commit efa5cf9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions sdk/apps/modal-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"@nightlylabs/nightly-connect-solana": "0.0.27",
"@nightlylabs/nightly-connect-sui": "0.0.27",
"@nightlylabs/wallet-selector-sui": "0.2.5",
"@nightlylabs/nightly-connect-polkadot": "0.0.8",
"@nightlylabs/wallet-selector-polkadot": "0.1.7",
"@nightlylabs/nightly-connect-polkadot": "0.0.11",
"@nightlylabs/wallet-selector-polkadot": "0.1.10",
"@polkadot/extension-inject": "^0.46.5",
"@polkadot/api": "^10.10.1",
"@solana/web3.js": "^1.77.2",
Expand Down
4 changes: 2 additions & 2 deletions sdk/apps/polkadot/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nightlylabs/nightly-connect-polkadot",
"version": "0.0.8",
"version": "0.0.11",
"type": "module",
"exports": {
".": {
Expand Down Expand Up @@ -55,4 +55,4 @@
"eventemitter3": "^5.0.1",
"uuid": "^9.0.0"
}
}
}
6 changes: 3 additions & 3 deletions sdk/apps/polkadot/src/Accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ export class Accounts implements InjectedAccounts {
this._triggerSubs()
}
// TODO: what does anyType do?
public get(anyType?: boolean): Promise<InjectedAccount[]> {
get = (anyType?: boolean): Promise<InjectedAccount[]> => {
return new Promise((resolve, reject) => {
resolve(this.activeAccounts)
})
}

public subscribe(cb: (accounts: InjectedAccount[]) => unknown): Unsubcall {
subscribe = (cb: (accounts: InjectedAccount[]) => unknown): Unsubcall => {
const id = Date.now().toString()
this.sub[id] = cb
// Debounce first response to allow the subscriber to set up
setTimeout(() => {
this._triggerSubs()
}, 10)
}, 100)
return (): void => {
delete this.sub[id]
}
Expand Down
4 changes: 2 additions & 2 deletions sdk/packages/selector-polkadot/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nightlylabs/wallet-selector-polkadot",
"version": "0.1.7",
"version": "0.1.10",
"description": "",
"type": "module",
"exports": {
Expand All @@ -24,7 +24,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@nightlylabs/nightly-connect-polkadot": "0.0.8",
"@nightlylabs/nightly-connect-polkadot": "0.0.11",
"@nightlylabs/wallet-selector-base": "0.2.3",
"@polkadot/extension-inject": "0.46.5",
"@polkadot/api": "10.10.1",
Expand Down
6 changes: 3 additions & 3 deletions sdk/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit efa5cf9

Please sign in to comment.