diff --git a/components/SelfRelayRegistration/SwitchAndPayAcknowledgement.tsx b/components/SelfRelayRegistration/SwitchAndPayAcknowledgement.tsx index 611cd19..47e190e 100644 --- a/components/SelfRelayRegistration/SwitchAndPayAcknowledgement.tsx +++ b/components/SelfRelayRegistration/SwitchAndPayAcknowledgement.tsx @@ -21,7 +21,6 @@ const SwitchAndPayAcknowledgement: React.FC = const { chain } = useNetwork(); const [localState, setLocalState] = useLocalStorage(); const [isMounted, setIsMounted] = useState(false); - console.log(signer); const registryContract = StolenWalletRegistryFactory.connect( CONTRACT_ADDRESSES?.[chain?.name!].StolenWalletRegistry as string, @@ -38,7 +37,6 @@ const SwitchAndPayAcknowledgement: React.FC = }); const { v, r, s } = ethers.utils.splitSignature(storedSignature.value); - const tx = await registryContract.acknowledgementOfRegistry( storedSignature.deadline, storedSignature.nonce, @@ -49,7 +47,6 @@ const SwitchAndPayAcknowledgement: React.FC = ); const receipt = await tx.wait(); - setLocalState({ acknowledgementReceipt: JSON.stringify(receipt) }); console.log(receipt); setLoading(false); diff --git a/components/WebRtcRegistration/Registeree/RegisterAndSign.tsx b/components/WebRtcRegistration/Registeree/RegisterAndSign.tsx index b67704a..c9a9b00 100644 --- a/components/WebRtcRegistration/Registeree/RegisterAndSign.tsx +++ b/components/WebRtcRegistration/Registeree/RegisterAndSign.tsx @@ -43,6 +43,9 @@ const RegisterAndSign: React.FC = ({ } const streamData = { + keyRef: REGISTRATION_KEY, + chainId: chain?.id!, + address: address!, value: typedSignature?.data!, deadline, nonce, diff --git a/components/WebRtcRegistration/Relayer/AcknowledgementPayment.tsx b/components/WebRtcRegistration/Relayer/AcknowledgementPayment.tsx index f805823..b5c55a9 100644 --- a/components/WebRtcRegistration/Relayer/AcknowledgementPayment.tsx +++ b/components/WebRtcRegistration/Relayer/AcknowledgementPayment.tsx @@ -50,7 +50,6 @@ const AcknowledgementPayment: React.FC = ({ libp2p, const deadline = ethers.BigNumber.from(storedSignature.deadline); const nonce = ethers.BigNumber.from(storedSignature.nonce); const { v, r, s } = ethers.utils.splitSignature(storedSignature.value); - const tx = await registryContract.acknowledgementOfRegistry( deadline, nonce, diff --git a/package.json b/package.json index 22f0512..168edac 100644 --- a/package.json +++ b/package.json @@ -14,18 +14,18 @@ "test:unit": "jest" }, "dependencies": { - "@chainsafe/libp2p-noise": "^10.0.1", + "@chainsafe/libp2p-noise": "^11.0.4", "@chakra-ui/icons": "^2.0.18", "@chakra-ui/react": "^2.5.5", "@chakra-ui/system": "^2.5.5", "@chakra-ui/theme-tools": "^2.0.16", "@emotion/react": "^11.10.6", "@emotion/styled": "^11.10.6", - "@libp2p/bootstrap": "^5.0.0", - "@libp2p/mplex": "^7.0.0", - "@libp2p/peer-id-factory": "^1.0.19", - "@libp2p/webrtc-star": "^5.0.3", - "@libp2p/webrtc-star-signalling-server": "^2.0.5", + "@libp2p/bootstrap": "^6.0.3", + "@libp2p/mplex": "^7.1.3", + "@libp2p/peer-id-factory": "^2.0.3", + "@libp2p/webrtc-star": "^6.0.0", + "@libp2p/webrtc-star-signalling-server": "^3.0.0", "@libp2p/websockets": "^5.0.0", "@rainbow-me/rainbowkit": "^0.8.1", "@svgr/webpack": "^6.5.0", diff --git a/pages/dapp/p2pRelay/connection.tsx b/pages/dapp/p2pRelay/connection.tsx index cbd3894..340da11 100644 --- a/pages/dapp/p2pRelay/connection.tsx +++ b/pages/dapp/p2pRelay/connection.tsx @@ -185,7 +185,7 @@ export const Connection = () => { break; case PROTOCOLS.REG_SIG: setSignatureLocalStorage(parsedData as setLocalStorageProps); - + const data = accessLocalStorage(); // TODO - resolve window.libp2p for libp2p instance await passStreamData({ libp2p: window.libp2p, diff --git a/utils/signature.ts b/utils/signature.ts index e65f4af..15af148 100644 --- a/utils/signature.ts +++ b/utils/signature.ts @@ -90,7 +90,6 @@ export const setSignatureWithExpiry = ({ const time = ttl; // .toNumber() + oneHour; const item = { value: value, - deadline: time, startTime: new Date(Date.now() + 1 * 60 * 1000), // TODO come back to this and insert startTime. deadlineDate: new Date(Date.now() + 6 * 60 * 1000), // TODO come back to this and insert deadline.