Skip to content

Commit

Permalink
Merge pull request #44 from DIMO-Network/development
Browse files Browse the repository at this point in the history
v0.0.15
  • Loading branch information
MoizAhmedd authored Jan 13, 2025
2 parents 0a4ac49 + eb1ce97 commit d6f6075
Show file tree
Hide file tree
Showing 10 changed files with 796 additions and 569 deletions.
Binary file modified example-dimo-auth/dimo-network-login-with-dimo-0.0.14.tgz
Binary file not shown.
Binary file not shown.
1,044 changes: 566 additions & 478 deletions example-dimo-auth/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example-dimo-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@types/node": "^16.18.114",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.1",
"@dimo-network/login-with-dimo": "file:./dimo-network-login-with-dimo-0.0.14.tgz",
"@dimo-network/login-with-dimo": "file:./dimo-network-login-with-dimo-0.0.15.tgz",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-scripts": "5.0.1",
Expand Down
23 changes: 14 additions & 9 deletions example-dimo-auth/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ function App() {
onSuccess={(authData: any) => console.log("Success:", authData)}
onError={(error: any) => console.error("Error:", error)}
permissionTemplateId={permissionsEnabled ? "2" : undefined}
unAuthenticatedLabel="Sign In with DIMO"
// vehicles={["585","586"]}
/>

Expand All @@ -74,6 +75,7 @@ function App() {
onSuccess={(authData: any) => console.log("Success:", authData)}
onError={(error: any) => console.error("Error:", error)}
permissionTemplateId={"2"}
vehicles={["752", "742", "738", "722"]}
/>

<ExecuteAdvancedTransactionWithDimo
Expand Down Expand Up @@ -112,17 +114,18 @@ function App() {
mode="redirect"
onSuccess={(authData: any) => console.log("Success:", authData)}
onError={(error: any) => console.error("Error:", error)}
permissionTemplateId={permissionsEnabled ? "1" : undefined}
// vehicles={["585","586"]}
/>

<ShareVehiclesWithDimo
mode="redirect"
onSuccess={(authData: any) => console.log("Success:", authData)}
onError={(error: any) => console.error("Error:", error)}
permissionTemplateId={"2"}
expirationDate={sampleExpirationDate.toISOString()}
/>
{isAuthenticated && (
<ShareVehiclesWithDimo
mode="redirect"
onSuccess={(authData: any) => console.log("Success:", authData)}
onError={(error: any) => console.error("Error:", error)}
permissionTemplateId={"2"}
expirationDate={sampleExpirationDate.toISOString()}
vehicles={["752", "742"]}
/>
)}

<ExecuteAdvancedTransactionWithDimo
mode="redirect"
Expand All @@ -135,6 +138,8 @@ function App() {
abi={sampleAbi}
functionName="transfer"
args={["0x62b98e019e0d3e4A1Ad8C786202e09017Bd995e1", "0"]}
authenticatedLabel="Execute Transaction"
unAuthenticatedLabel="Sign In to Execute Transaction with DIMO"
/>
</div>
</header>
Expand Down
Loading

0 comments on commit d6f6075

Please sign in to comment.