Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified packages/mobile-sdk/.yarn/install-state.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/mobile-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"release": true
},
"devDependencies": {
"@snickerdoodlelabs/core": "^1.1.1",
"@snickerdoodlelabs/core": "^1.1.2",
"@testing-library/react-native": "^12.3.0",
"@types/node": "^16.11.15",
"@types/react": "^17.0.39",
Expand Down
11 changes: 8 additions & 3 deletions packages/mobile-sdk/src/context/CoreContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,14 @@ const CoreProvider: React.FC<ICoreProviderProps> = ({ children, configs }) => {
};

React.useEffect(() => {
snickerdoodleCore.initialize().map(() => {
setIsInitialized(true);
});
snickerdoodleCore
.initialize()
.map(() => {
setIsInitialized(true);
})
.mapErr((error) => {
console.log("Error initializing core", error);
});
}, []);

return (
Expand Down
13 changes: 6 additions & 7 deletions packages/mobile-sdk/src/context/LayoutContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface InvitationPopupProps {
}

const LayoutContext = createContext<ILayoutContextType>(
{} as ILayoutContextType
{} as ILayoutContextType,
);

const LayoutProvider: React.FC<ILayoutContextProps> = ({ children }: any) => {
Expand All @@ -31,14 +31,13 @@ const LayoutProvider: React.FC<ILayoutContextProps> = ({ children }: any) => {
if (showPopup && invitation) {
snickerdoodleCore
?.getConsentContractCID(
invitation?.consentContractAddress as EVMContractAddress
invitation?.consentContractAddress as EVMContractAddress,
)
.andThen((cid) => {
return snickerdoodleCore.invitation
.getInvitationMetadataByCID(cid)
.map((metaData) => {
setInvitationMetadata(metaData);
});
return snickerdoodleCore.invitation.getInvitationMetadataByCID(cid);
})
.map((metaData) => {
setInvitationMetadata(metaData);
})
.mapErr((error) => {
console.log("Error getting invitation metadata", error);
Expand Down
48 changes: 24 additions & 24 deletions packages/mobile-sdk/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2614,7 +2614,7 @@ __metadata:
languageName: node
linkType: hard

"@snickerdoodlelabs/core@npm:^1.1.1":
"@snickerdoodlelabs/core@npm:^1.1.2":
version: 1.1.2
resolution: "@snickerdoodlelabs/core@npm:1.1.2"
dependencies:
Expand Down Expand Up @@ -2680,6 +2680,29 @@ __metadata:
languageName: node
linkType: hard

"@snickerdoodlelabs/mobile-integration@workspace:.":
version: 0.0.0-use.local
resolution: "@snickerdoodlelabs/mobile-integration@workspace:."
dependencies:
"@react-native-async-storage/async-storage": 1.18.2
"@snickerdoodlelabs/core": ^1.1.2
"@testing-library/react-native": ^12.3.0
"@types/node": ^16.11.15
"@types/react": ^17.0.39
"@types/react-native": ^0.66.11
jest: ^29.7.0
neverthrow: ^5.1.0
neverthrow-result-utils: ^2.0.2
react-native-builder-bob: 0.20.4
react-test-renderer: ^18.2.0
typescript: ^4.5.4
peerDependencies:
"@react-native-async-storage/async-storage": "*"
react: "*"
react-native: "*"
languageName: unknown
linkType: soft

"@snickerdoodlelabs/node-utils@npm:^1.0.0, @snickerdoodlelabs/node-utils@npm:^1.0.1":
version: 1.0.1
resolution: "@snickerdoodlelabs/node-utils@npm:1.0.1"
Expand Down Expand Up @@ -7664,29 +7687,6 @@ __metadata:
languageName: node
linkType: hard

"snickerdoodlesdk-test@workspace:.":
version: 0.0.0-use.local
resolution: "snickerdoodlesdk-test@workspace:."
dependencies:
"@react-native-async-storage/async-storage": 1.18.2
"@snickerdoodlelabs/core": ^1.1.1
"@testing-library/react-native": ^12.3.0
"@types/node": ^16.11.15
"@types/react": ^17.0.39
"@types/react-native": ^0.66.11
jest: ^29.7.0
neverthrow: ^5.1.0
neverthrow-result-utils: ^2.0.2
react-native-builder-bob: 0.20.4
react-test-renderer: ^18.2.0
typescript: ^4.5.4
peerDependencies:
"@react-native-async-storage/async-storage": "*"
react: "*"
react-native: "*"
languageName: unknown
linkType: soft

"socks-proxy-agent@npm:^7.0.0":
version: 7.0.0
resolution: "socks-proxy-agent@npm:7.0.0"
Expand Down