Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
rygine committed Nov 21, 2023
1 parent 21ad753 commit 9bb5bf9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/helpers/domHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ export const getRecipientInputSubtext = (
recipientState: RecipientState,
recipientOnNetwork: boolean,
) => {
console.log("recipientInput", recipientInput);

Check failure on line 9 in src/helpers/domHelpers.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected console statement
console.log("recipientAddress", recipientAddress);

Check failure on line 10 in src/helpers/domHelpers.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected console statement
console.log("recipientState", recipientState);

Check failure on line 11 in src/helpers/domHelpers.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected console statement
console.log("recipientOnNetwork", recipientOnNetwork);

Check failure on line 12 in src/helpers/domHelpers.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected console statement

if (!recipientInput) {
return "messages.address_field_prompt";
}
Expand Down
7 changes: 7 additions & 0 deletions src/hooks/useAddressInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ export const useAddressInput = () => {
const fetchAddressIdentity = async () => {
// must have a valid recipient address
if (recipientAddress) {
console.log("fetchAddressIdentity: has recipientAddress");

Check failure on line 42 in src/hooks/useAddressInput.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected console statement
// no name
if (!recipientName) {
console.log("fetchAddressIdentity: no name: fetching...");

Check failure on line 45 in src/hooks/useAddressInput.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected console statement
setRecipientState("loading");
// check for name
const name = await throttledFetchEnsName({
Expand All @@ -50,6 +52,7 @@ export const useAddressInput = () => {
}
// no avatar
if (!recipientAvatar && recipientName) {
console.log("fetchAddressIdentity: no avatar: fetching...");

Check failure on line 55 in src/hooks/useAddressInput.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected console statement
setRecipientState("loading");
// check for avatar
const avatar = await throttledFetchEnsAvatar({
Expand All @@ -59,6 +62,9 @@ export const useAddressInput = () => {
}
// make sure we can message the recipient
if (!recipientOnNetwork) {
console.log(

Check failure on line 65 in src/hooks/useAddressInput.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected console statement
"fetchAddressIdentity: recipient not on network: checking...",
);
setRecipientState("loading");
const validRecipient = await canMessage(recipientAddress);
if (validRecipient) {
Expand All @@ -67,6 +73,7 @@ export const useAddressInput = () => {
setRecipientOnNetwork(false);
}
}
console.log("setting state to valid");

Check failure on line 76 in src/hooks/useAddressInput.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected console statement
setRecipientState("valid");
}
};
Expand Down

0 comments on commit 9bb5bf9

Please sign in to comment.