Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F 703 support multi recipient #531

Merged
merged 15 commits into from
Jun 19, 2022
Merged

Conversation

mohammadranjbarz
Copy link
Collaborator

Copy link
Collaborator

@CarlosQ96 CarlosQ96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore this hahah

@mohammadranjbarz
Copy link
Collaborator Author

@MoeNick @CarlosQ96 @MohammadPCh

After merging this PR ( we are waiting for current release after that we would review and merge this)
The frontend should change two some web services:

createProject and updateProject

Instead of sending walletAddress you should send this in the body of request

 addresses: [
        {
          address: walletAddress,
          networkId: 1 (for mainnet) or 3( for ropsten) or 100 (for xDai),
        },
      ]

Getting projects

In every service that frontend gets project list or project detail , it would get address infoes as well with adding this to graphql query

 addresses {
          address
          isRecipient
          networkId
        }

And then based on each network that user selected on metamask frontend should use the address of that network, and make sure that the isRecipient is true for that address

@mohammadranjbarz
Copy link
Collaborator Author

@CarlosQ96 Please review it, but I keep it draft to not merge it until the frontend guys @MohammadPCh or @MoeNick tell us to merge it, because this PR changes are not backward compatible and staging may break if we merge it without implementing frontend side

Copy link
Collaborator

@CarlosQ96 CarlosQ96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#525 (comment) I think you mentioned the projectByAddress mutation is no longer used. We should delete it as it would be incomplete with this Pr, it would need to search by related addresses too.

Same for project query. As we do not user repository to fetch project.

if (purpleAddress) return true;

return false;
return isWalletAddressInPurpleList(address);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sql injection can be done here, escape the address on the raw query.

src/repositories/projectAddressRepository.ts Outdated Show resolved Hide resolved
@MoeNick MoeNick requested a review from mateodaza June 8, 2022 13:29
@CarlosQ96
Copy link
Collaborator

CarlosQ96 commented Jun 8, 2022

Quick question, is the previous purple address list lost? gotta reintroduce them in the adminbro?

@mohammadranjbarz
Copy link
Collaborator Author

Quick question, is the previous purple address list lost? gotta reintroduce them in the adminbro?

Yeah we would lose them, but now there isn't any purple addresses in our DB and I told Ashley to not add any addresses until we merge this, so it would not make a problem

@CarlosQ96
Copy link
Collaborator

CarlosQ96 commented Jun 11, 2022

I think we can skip deleting the other mutations for now. The sql injection is fixed.

src/resolvers/projectResolver.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@CarlosQ96 CarlosQ96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome job man! All issues fixed. I think we only have to coordinate with @mateodaza to merge. He is wanting to integrate.

@mohammadranjbarz mohammadranjbarz marked this pull request as ready for review June 19, 2022 05:36
@mohammadranjbarz mohammadranjbarz merged commit c352a0c into staging Jun 19, 2022
@aminlatifi aminlatifi deleted the f_703_support_multi_recipient branch January 25, 2023 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants