-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into develop
- Loading branch information
Showing
54 changed files
with
1,365 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,7 @@ | |
url = [email protected]:golemfactory/golem-sdk-task-executor.git | ||
branch = pociej/deposit | ||
|
||
[submodule "yagna"] | ||
path = yagna | ||
url = [email protected]:golemfactory/yagna.git | ||
branch = js-sdk-deposit-poc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
import { startupFastifyServer } from "./fastify.js"; | ||
import "./di.js"; | ||
|
||
console.log("process", process.env); | ||
startupFastifyServer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,12 @@ | ||
#root { | ||
max-width: 1280px; | ||
margin: 0 auto; | ||
padding: 2rem; | ||
text-align: center; | ||
} | ||
|
||
.logo { | ||
height: 6em; | ||
padding: 1.5em; | ||
will-change: filter; | ||
transition: filter 300ms; | ||
} | ||
.logo:hover { | ||
filter: drop-shadow(0 0 2em #646cffaa); | ||
} | ||
.logo.react:hover { | ||
filter: drop-shadow(0 0 2em #61dafbaa); | ||
} | ||
|
||
@keyframes logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
|
||
@media (prefers-reduced-motion: no-preference) { | ||
a:nth-of-type(2) .logo { | ||
animation: logo-spin infinite 20s linear; | ||
} | ||
} | ||
|
||
.card { | ||
padding: 2em; | ||
} | ||
|
||
.read-the-docs { | ||
color: #888; | ||
} | ||
#app:before { | ||
content: ''; | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
background-image: url('https://assets-global.website-files.com/62446d07873fde065cbcb8d5/657201ccae29e25f6b000267_6a72402a-185c-4223-930f-6032853bd089%201.jpg'); | ||
background-size: cover; | ||
} | ||
|
||
#app { | ||
position: relative; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
import { Button, Card, Loading } from "react-daisyui"; | ||
import { useSignNonce } from "hooks/useSignNonce"; | ||
import { useLogin } from "hooks/useLogin"; | ||
import { useAccount } from "wagmi"; | ||
import { useEffect, useState } from "react"; | ||
import { AnimatePresence, motion } from "framer-motion"; | ||
import { useDebounce } from "hooks/useDebounce"; | ||
export const RegisterButton = ({ isVisible }: { isVisible: boolean }) => { | ||
const { register, signature, message, isPending } = useSignNonce(); | ||
const { address: walletAddress } = useAccount(); | ||
const { login, tokens, isWaiting } = useLogin(); | ||
|
||
if (!walletAddress) { | ||
throw new Error("Wallet address not found"); | ||
} | ||
|
||
const debouncedPending = useDebounce( | ||
isPending, | ||
new Map([ | ||
[true, 0], | ||
[false, 1000], | ||
]) | ||
); | ||
|
||
useEffect(() => { | ||
if (signature) { | ||
login({ | ||
walletAddress, | ||
messageSignature: signature, | ||
message, | ||
}); | ||
} | ||
}, [signature]); | ||
|
||
useEffect(() => { | ||
if (tokens) { | ||
localStorage.setItem("accessToken", tokens.accessToken); | ||
localStorage.setItem("refreshToken", tokens.refreshToken); | ||
} | ||
}, [tokens]); | ||
|
||
return ( | ||
<AnimatePresence> | ||
{isVisible && ( | ||
<motion.div | ||
initial={{ opacity: 0 }} | ||
animate={{ opacity: 1 }} | ||
exit={{ opacity: 0, scale: 0.3 }} | ||
transition={{ duration: 0.5 }} | ||
> | ||
<Card | ||
style={{ | ||
borderColor: "#ffffff14", | ||
fontFamily: "Kanit-Light", | ||
backgroundColor: "#0000005b", | ||
scale: "1.2", | ||
}} | ||
> | ||
<Card.Body> | ||
{/* <Card.Title tag="h2">Log in</Card.Title> */} | ||
<Card.Body> | ||
Login to service with your wallet address to prove your wallet | ||
ownership. | ||
</Card.Body> | ||
|
||
<Card.Actions className="justify-end"> | ||
<Button | ||
onClick={() => { | ||
register({ walletAddress }); | ||
}} | ||
className="bg-primary !text-white border-none text-lg font-light " | ||
style={{ | ||
backgroundColor: "#181ea9a6", | ||
}} | ||
> | ||
{isWaiting || debouncedPending ? ( | ||
<Loading variant="infinity" /> | ||
) : ( | ||
"Register in service" | ||
)} | ||
</Button>{" "} | ||
</Card.Actions> | ||
</Card.Body> | ||
</Card> | ||
</motion.div> | ||
)} | ||
</AnimatePresence> | ||
// <Button | ||
// onClick={() => { | ||
// register({ walletAddress }); | ||
// }} | ||
// className="bg-primary !text-white border-none text-lg font-light " | ||
// style={{ | ||
// backgroundColor: "#181ea9a6", | ||
// }} | ||
// > | ||
// Register in service | ||
// </Button> | ||
// ); | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { motion } from "framer-motion"; | ||
import { useUser } from "hooks/useUser"; | ||
import { AllowanceSummary } from "./allowanceSummary"; | ||
import { ApproveForm } from "./approveForm"; | ||
|
||
const variants = { | ||
onTop: { | ||
top: "205px", | ||
left: "30px", | ||
}, | ||
onCenter: { | ||
top: "30vh", | ||
}, | ||
}; | ||
|
||
export const Allowance = () => { | ||
const { user } = useUser(); | ||
|
||
return ( | ||
<motion.div | ||
style={{ | ||
position: "absolute", | ||
}} | ||
animate={user.hasEnoughAllowance() ? "onTop" : "onCenter"} | ||
variants={variants} | ||
transition={{ duration: 0.5 }} | ||
> | ||
<ApproveForm | ||
isVisible={user.hasKnownAllowance() && !user.hasEnoughAllowance()} | ||
/> | ||
<AllowanceSummary | ||
isVisible={user.hasKnownAllowance() && user.hasEnoughAllowance()} | ||
/> | ||
</motion.div> | ||
); | ||
}; |
Oops, something went wrong.