Skip to content

Commit

Permalink
final
Browse files Browse the repository at this point in the history
  • Loading branch information
dinesh11515 committed Feb 19, 2023
1 parent 6414249 commit 9f61fed
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions frontend/components/UI/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ const Navbar = () => {
>
Home
</p>
<p
{/* <p
onClick={() => {
router.push("/dashboard");
}}
className="cursor-pointer"
>
Dashboard
</p>
</p> */}
</div>
</nav>
);
Expand Down
1 change: 1 addition & 0 deletions frontend/components/createFlow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export async function createNewFlow(
const chainId = await provider
.getNetwork()
.then((network: any) => network.chainId);
console.log(chainId);

const sf = await Framework.create({
chainId: Number(chainId),
Expand Down
13 changes: 8 additions & 5 deletions frontend/pages/pay/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ const Pay = () => {
const [tokenName, setTokenName] = useState("");
const [account, setAccount] = useState("");

console.log(user);

const router = useRouter();
const { userName, chain } = router.query;

const auth = useAuth();
console.log(auth, "auth");
const provider = auth.provider;
console.log(provider, "provider");
const onLogin = async () => {
const provider = auth.provider;
try {
Expand Down Expand Up @@ -82,7 +82,10 @@ const Pay = () => {
method: "wallet_switchEthereumChain",
params: [{ chainId: "5001" }],
});
console.log(provider);
const web3Provider = new ethers.providers.Web3Provider(provider);
const signer = web3Provider.getSigner();
const address = await signer.getAddress();
setAccount(address);
}
} catch (e) {
console.log(e, "onLogin");
Expand Down Expand Up @@ -150,7 +153,7 @@ const Pay = () => {
setTokenName(name);
};
const requestingHandler = () => {
setShowPaymentModal(true);
setShowRequestModal(true);
};

const streamHandler = () => {
Expand Down Expand Up @@ -246,7 +249,7 @@ const Pay = () => {
</p>
</button>
<button
onClick={scheduleHandler}
onClick={requestingHandler}
className="border border-black rounded-xl px-6 py-2 hover:border-[#1B0B22] hover:text-[#1B0B22] hover:bg-black/10"
>
<p className="flex gap-2 items-center font-semibold">
Expand Down

0 comments on commit 9f61fed

Please sign in to comment.