Giter VIP home page Giter VIP logo

feathers-giveth's People

Contributors

aminlatifi avatar arbreton avatar caseyhelbling avatar cryptomental avatar dapplion avatar dependabot[bot] avatar ewingrj avatar gencymex avatar horus2021 avatar mahdine avatar mdehghani avatar mhmdksh avatar mohammadpch avatar mohammadranjbarz avatar ojones avatar ovx avatar santteegt avatar satyavh avatar twmilli avatar vojtechsimetka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

feathers-giveth's Issues

npm install does not work

Hi, I have a problem by running npm install. I got the following error:

npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EAI_AGAIN: request to https://registry.npmjs.org/feathers-authentication failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443
npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/node-libs-browser/node_modules/path-browserify):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: request to https://registry.npmjs.org/path-browserify failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443

npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/os-browserify failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443

npm ERR! A complete log of this run can be found in: ...

I'm using:

Ubuntu 16.04
node v8.9.0
npm 5.5.1
yarn 1.3.2

Can't delegate donations that are not created by me

When you get incoming donations that are not made by you, they need to be delegated.
We delegate (for now) by patching the donation. But if donorAddress is not the currentUser, then Feathers throws a not authorized error, which means the client cannot patch the donation.

Secure feathers models

We should secure the feathers models to avoid any unwanted fields entering the database.

Making a donation throws invalid opcode

Reproduce:

  1. make donation, it will fail.
  2. Now check console:
  Transaction: 0x322d6735b0b15d53092c9b7aa1ed5bb30344b4a14d763f7d00116a97fe54e0c8
  Gas usage: 196219
  Block Number: 32
  Block Time: Fri Nov 24 2017 13:44:59 GMT+0100 (CET)
  Runtime Error: invalid opcode

Implement Connect with LinkedIn on user profile

As discussed:

  1. as a method to validate someone's email address.
  2. as a way for donators to validate a campaign / DAC experience
  3. as a way for donators to have social proof of that experience (like you could literally ask connections of the DAC owner how reliable that person is).

Delegation from campaign to milestone throws error

Reproduce:

  1. donate to campaign
  2. go to delegations
  3. delegate to milestone

This will fail both locally as well as on alpha. The error in the browser console is:

"Error: the tx doesn't have the correct nonce. acco…les/ethereumjs-testrpc/build/cli.node.js:81513:3)", code: -32000}
code: -32000
message: "Error: the tx doesn't have the correct nonce. account has nonce of: 15 tx has nonce of: 14↵

no errors in feathers / testrpc

Get `No record found for id` error when signing in with keystore wallet

Reproduce:

  1. rm -rf data
  2. Empty localstorage for the Giveth app
  3. node --harmony deploy.js
  4. load the Dapp
  5. Go to sign in, load testrpcDeterministicAccount0.json from Giveth-Dapp repro

Now you will get this error:

info: after: authentication/challenges - Method: create
info: error: authentication - Method: create: Challenge = k2KWCVXhwC3rgHQgyMGH
error:  NotAuthenticated: Challenge = k2KWCVXhwC3rgHQgyMGH
    at NotAuthenticated (/Users/satya/Development/feathers-giveth/node_modules/feathers-errors/lib/index.js:100:17)
    at /Users/satya/Development/feathers-giveth/node_modules/feathers-authentication/lib/hooks/authenticate.js:102:31
    at <anonymous>
info: after: authentication/challenges - Method: get
info: error: users - Method: get: No record found for id '0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1'
error:  NotFound: No record found for id '0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1'
    at NotFound (/Users/satya/Development/feathers-giveth/node_modules/feathers-errors/lib/index.js:121:17)
    at /Users/satya/Development/feathers-giveth/node_modules/feathers-nedb/lib/index.js:146:17
    at <anonymous>

Need a way to get wallet balance

We should fetch the wallet balance before the donation popup is shown, so we can make sure the donator does not donate more than is in the wallet.

Notification system

We need to provide notifications when something in the dapp happens. People are not going to check out the dapp all the time to see what happens, we need to bring the info to them.

Could be email, slack, etc.

Update Milestone model

Can we include the following fields in the milestone model, as per the mock:

  • image (base64)
  • video url (string)
  • description (string)
  • owner (string)
  • reviewers [string]
  • status [enum?]
  • causeID (string)

`mined` property on milestone object not set

There's a check in the Dapp (My Milestones) on the milestone property mined. That property is not returned form the /milestones service. Hence, the request withdrawal functionality does not appear in the UI

Add Prettier and Prettier ESLint

User Story

User story 1: As a developer, I don't want to have to worry about formatting styles. I want code to autoformat whenever I save. I want to completely remove any thinking of formatting from my workflow.

User story 2: As a reviewer, I want to ensure that code is formatted correctly and I don't have to review formatting errors and comment on them.

Type: Developer Tool

Summary: Integrate Prettier and Prettier ESLint into the project.

There are multiple editor integrations such as VSCode, Sublime, Atom, Vim and more.
In addition with Prettier ESLint we can get the power of ESLint --fix to automatically fix Prettier errors automatically even when not using any plugins.

Links:
https://github.com/prettier/prettier/
https://prettier.io/
https://prettier.io/docs/en/eslint.html

Expected behavior

While coding I have a formatting style guide that I am forced to follow and if I don't I get linting errors which could potentially break builds.

Actual behavior

Currently developers have to think about maintaining the current style of formatting and coding and thinking hard about this wastes time to think of other more important problems.

Solution

Summary:

I will add Prettier and Prettier ESLint integration and write up a Formatting.md file to explain how to use this in a few editors of choice.

Additional Information

This is open to suggestions/feedback.

mutliple giverIds added for a single user if they donate multiple times

we assign the user a giverId when their first donation is mined, or the first time they create a profile. If they donate a second time before the 1st tx is mined, we will send the donate tx w/ giverId 0 which will create another giverId. This can lead to a single user having multiple giverIds.

Figure out a way to deal with this

Add authentication

Currently there is no authentication to milestones or donations.

Configure milestones and donations services to use authentication to limit access to data particular to the owner who created it.

Listen to Ownership* events on plugins

the lpp-dac, lpp-milestone, and lpp-campaign plugins extend the Owned contract. The Owned contract emits the following events:

  • OwnershipRequested
  • OwnershipTransferred
  • OwnershipRemoved

We should listen to these events, and update the dac/campaign/milestone in feathers as appropriate

Keep track of total amount raised for DACs/Campaigns

When delegating money away from DACs/Causes, the donations will currently disappear from that DAC/Cause. That means we cannot show the total amount raised for that DAC/Campaign.

So in case all money has been delegated, the total amount raised will show 0

That is not a very good incentive for new donors. Plus it will show the DAC/Campaign has no community

handle chain reorgs

If a chain reorg happens, we need to update feathers to reflect the new state.

I saved a log file where a chain reorg happened on the feathers develop server.

donation counters can be easily gamed

We should update the donation counters if a donation is refunded, otherwise it's possible for someone to keep donating and refunding to make their dac look better

Cannot create a new campaign, throws on eth_estimateGas

"Error: VM Exception while executing eth_estimateGas: invalid opcode
    at /Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:65907:17
    at /Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:85139:5
    at /Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:4783:9
    at /Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:1343:16
    at replenish (/Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:1863:25)
    at iterateeCallback (/Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:1853:17)
    at /Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:1828:16
    at /Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:4780:13
    at /Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:85135:9
    at /Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:81420:7"

When creating a campaign I get an _addMilestone error

Reproduce:

  1. create a campaign

Now check the feathers console

_addMilestone error -> Error: Returned error: Error: VM Exception while executing eth_call: invalid opcode
    at /Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:65907:17
    at /Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:85139:5
    at /Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:4783:9
    at /Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:1343:16
    at replenish (/Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:1863:25)
    at iterateeCallback (/Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:1853:17)
    at /Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:1828:16
    at /Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:4780:13
    at /Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:85135:9
    at /Users/satya/Development/feathers-giveth/node_modules/ethereumjs-testrpc/build/cli.node.js:81420:7
    at Object.ErrorResponse (/Users/satya/Development/feathers-giveth/node_modules/web3/packages/web3-core-helpers/src/errors.js:29:16)
    at Object.<anonymous> (/Users/satya/Development/feathers-giveth/node_modules/web3/packages/web3-core-requestmanager/src/index.js:137:36)
    at /Users/satya/Development/feathers-giveth/node_modules/web3/packages/web3-providers-ws/src/index.js:76:44
    at Array.forEach (native)
    at W3CWebSocket.WebsocketProvider.connection.onmessage (/Users/satya/Development/feathers-giveth/node_modules/web3/packages/web3-providers-ws/src/index.js:53:36)
    at W3CWebSocket._dispatchEvent [as dispatchEvent] (/Users/satya/Development/feathers-giveth/node_modules/web3/packages/web3-providers-ws/node_modules/yaeti/lib/EventTarget.js:107:17)
    at W3CWebSocket.onMessage (/Users/satya/Development/feathers-giveth/node_modules/web3/packages/web3-providers-ws/node_modules/websocket/lib/W3CWebSocket.js:234:14)
    at WebSocketConnection.<anonymous> (/Users/satya/Development/feathers-giveth/node_modules/web3/packages/web3-providers-ws/node_modules/websocket/lib/W3CWebSocket.js:205:19)
    at emitOne (events.js:115:13)
    at WebSocketConnection.emit (events.js:210:7)
    at WebSocketConnection.processFrame (/Users/satya/Development/feathers-giveth/node_modules/web3/packages/web3-providers-ws/node_modules/websocket/lib/WebSocketConnection.js:547:26)
    at /Users/satya/Development/feathers-giveth/node_modules/web3/packages/web3-providers-ws/node_modules/websocket/lib/WebSocketConnection.js:321:40
    at _combinedTickCallback (internal/process/next_tick.js:95:7)
    at process._tickCallback (internal/process/next_tick.js:161:9)

Update Causes model

Can we include the following fields in the causes model, as per the mock:

  • image (base64)
  • video url (string)
  • description (string)
  • owner (string)

Tokens are not saved in donationTokens.db

Reproduce:

  1. make a donation

now check feathers console. It generates the event correctly:

handling GenerateTokens Event:  { logIndex: 3,
  transactionIndex: 0,
  transactionHash: '0xf9c7dea9a656140676706ab700bcbb308d34f6c6808808f7b55148336c4a4eb2',
  blockHash: '0xc25020a3d9e842a3557f3b300eff663faaa4e6856e6d9f1ac3cd9ba095022bc5',
  blockNumber: 27,
  address: '0xC89Ce4735882C9F0f0FE26686c53074E09B0D550',
  type: 'mined',
  id: 'log_7adb2dd4',
  returnValues:
   Result {
     '0': '0x5b1869D9A4C187F2EAa108f3062412ecf0526b24',
     '1': '0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1',
     '2': '2000000000000000000',
     liquidPledging: '0x5b1869D9A4C187F2EAa108f3062412ecf0526b24',
     addr: '0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1',
     amount: '2000000000000000000' },
  event: 'GenerateTokens',
  signature: '0xf8a6cdb77a67632a46c21be3e7ca9b2519ecd39d21e514f9222c5b2f19ce23ed',
  raw:
   { data: '0x00000000000000000000000090f8bf6a479f320ead074411a4b0e7944ea8c9c10000000000000000000000000000000000000000000000001bc16d674ec80000',
     topics:
      [ '0xf8a6cdb77a67632a46c21be3e7ca9b2519ecd39d21e514f9222c5b2f19ce23ed',
        '0x0000000000000000000000005b1869d9a4c187f2eaa108f3062412ecf0526b24' ] } }

But it also throws errors and tokens are not saved in database

Find replacement for Skylight

SkyLight is kind of hard to use because stateless doesn't have all the callbacks that controlled modals have. So either we find a replacement, or fork and extend.

Add the unique count of people who donated to an entity

Currently we track the amount of donations with donationCount. But we want to show the unique amount of people who support a project. So we need to add something like peopleCount to the donationsHistory.hook.js. This needs to count the unique givers for an entity.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.