Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/paperxyz/test-repo into win…
Browse files Browse the repository at this point in the history
…ston/update-client-id
  • Loading branch information
ElasticBottle committed Oct 20, 2023
2 parents a00aa64 + 61b4165 commit a23a163
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions packages/embedded-wallet-service-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @paperxyz/embedded-wallet-service-sdk

## 1.2.5

### Patch Changes

- 71b3fb4: add auth Success callback

## 1.2.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/embedded-wallet-service-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@paperxyz/embedded-wallet-service-sdk",
"description": "Embedded Wallets SDK by Paper",
"version": "1.2.4",
"version": "1.2.5",
"license": "Apache-2.0",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import type {
} from "@paperxyz/sdk-common-utilities";
import type { EmbeddedWallet } from "../../lib/EmbeddedWallets/EmbeddedWallet";
import type { EmbeddedWalletIframeCommunicator } from "../../utils/iFrameCommunication/EmbeddedWalletIframeCommunicator";
import type { AdvancedOptions, RecoveryShareManagement } from "../Auth";
import type {
AdvancedOptions,
AuthAndWalletRpcReturnType,
RecoveryShareManagement,
} from "../Auth";

// Class constructor types
// types for class constructors still a little messy right now.
Expand All @@ -13,6 +17,7 @@ export type ClientIdConstructorType = { clientId: string };
export type PaperConstructorType<T extends RecoveryShareManagement> =
ClientIdConstructorType & {
chain: Chain;
onAuthSuccess?: (authResult: AuthAndWalletRpcReturnType) => void;
advancedOptions?: Partial<AdvancedOptions<T>>;
styles?: CustomizationOptionsType;
};
Expand Down
2 changes: 2 additions & 0 deletions packages/embedded-wallet-service-sdk/src/lib/Paper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export class PaperEmbeddedWalletSdk<
chain,
styles,
advancedOptions,
onAuthSuccess,
}: PaperConstructorType<T>) {
this.clientId = clientId;
this.querier = new EmbeddedWalletIframeCommunicator({
Expand Down Expand Up @@ -69,6 +70,7 @@ export class PaperEmbeddedWalletSdk<
authCookie: authResult.storedToken.cookieString,
},
});
onAuthSuccess?.(authResult);
return {
user: {
status: UserStatus.LOGGED_IN_WALLET_INITIALIZED,
Expand Down

0 comments on commit a23a163

Please sign in to comment.