blockchain4humanity / dapp-ui Goto Github PK
View Code? Open in Web Editor NEWThis project forked from giveth/giveth-dapp
Crowdfunding and managing donations on the blockchain
License: GNU General Public License v3.0
This project forked from giveth/giveth-dapp
Crowdfunding and managing donations on the blockchain
License: GNU General Public License v3.0
There is a problem getting some data in the My Delegations screen. It throws in feathers:
0|dapp-feathers | 2019-01-24 18:15: info: error: milestones - Method: find - Cannot read property 'forEach' of undefined
0|dapp-feathers | 2019-01-24 18:15: error: undefined
0|dapp-feathers | 2019-01-24 18:15: info: error: milestones - Method: find - Cannot read property 'forEach' of undefined
0|dapp-feathers | 2019-01-24 18:15: error: undefined
Readmes, wiki and doc texts
DApp UI
Communications: (i.e mail warning available delegation)
Hardcoded names
For some reason the exchange rate does not work correctly in the testnet environment. It does not give the options to chose from when creating milestone.
actually the non-line item date picker is also broken
The delegate here button does not seem to work at all. It does not display the available Campaigns/Milestones to delegate to. That is probably just the beginning of the problem, there is also definitely and issue with maxAmount and the amount that is delegated.
Implement Portis wallet. This should be default wallet if no web3 provider is detected. If there is web3 provider, allow users to chose which they want to use.
Estimate: 20h
We haven't implemented IPFS uploads for Milestone Proof, and this is necessary for #2
When user edits milestone there is no transaction. The content is change straight in feathers. The correct behavior should be upload to IPFS and transaction modifying the IPFS hash in the contracts.
This works as expected in DACs and Campaigns
Editing milestone throws error.
Reproduce:
Expected behaviour: feathers should process the event immediately and dac should be updated from pending
Trying to donate to BTC throws errors when the transaction is being created. It seems like the LPP donate with just 2 params does not exist. https://github.com/blockchain4humanity/dapp-ui/blob/develop/src/services/DonationService.jsx#L861
Reproduce:
Expected behaviour: feathers should process the event immediately.
info: Adding new event. Block: 2041 log: 1 transactionHash: 0x01c47182359bf1b3c8b534cd65e00d94229664044c1dd827bca623428a99a32d
error: Attempt to add an event that already exists. Blocknumber: 1927, logIndex: 1, transactionHash: 0xd0a9f4f69cf2fda69fa52ceabfe463acb89641c2b43da7743e870bff30fad12a
error: Attempt to add an event that already exists. Blocknumber: 2041, logIndex: 1, transactionHash: 0x01c47182359bf1b3c8b534cd65e00d94229664044c1dd827bca623428a99a32d
info: Checking new events between blocks 2332-2501
info: Handling Event: "5c4ec513f32c465348c8749d"
error: undefined
error: error in the processing looop Error: Couldn't decode address from ABI: 0x00
And as a result the campaign remains pending.
Expected behavior: feathers should process the event correctly and update the status of the campaign from pending to ready.
Delegating to a Milestone/Campaign within the entity using the "Delegate here" button does not work correctly. This is likely caused by the duplicate donations and linked to issue #3
When delegating with the delegate here button, the token is undefined for the donations. This breaks both feathers and UI.
{"_id":{"$oid":"5c48ba290d8a7d399c7b38a2"},"status":"Failed","mined":true,"parentDonations":["5c47d34ebdebf35c0225ccb5","5c48b8270d8a7d399c7b389c"],"isReturn":false,"txHash":"0x58852faa26621b8fcbdb05f7a745d475a4ce0ddf7d2581c6466b73a31a1e74e0","amount":"250000000000000000000","amountRemaining":"250000000000000000000","giverAddress":"0xbFd44dDEFF1394bBBeB572435fb04B507CEeb35b","pledgeId":"0","ownerId":{"$numberInt":"1"},"ownerTypeId":"0xbFd44dDEFF1394bBBeB572435fb04B507CEeb35b","ownerType":"giver","delegateId":{"$numberInt":"2"},"delegateTypeId":"5c475d761bbf0814e1c72312","intendedProjectId":{"$numberInt":"3"},"intendedProjectTypeId":"5c4764451bbf0814e1c7231f","createdAt":{"$date":{"$numberLong":"1548270121029"}},"updatedAt":{"$date":{"$numberLong":"1548277588866"}},"__v":{"$numberInt":"0"}}
{"_id":{"$oid":"5c48c6fd0d8a7d399c7b38a9"},"status":"ToApprove","mined":false,"parentDonations":["5c47d34ebdebf35c0225ccb5","5c48b8270d8a7d399c7b389c"],"isReturn":false,"txHash":"0xd1aaa13b696208b0307b863e784532e3f69f23873c6ac9eba3685d7568c367cb","amount":"250000000000000000000","amountRemaining":"250000000000000000000","giverAddress":"0xbFd44dDEFF1394bBBeB572435fb04B507CEeb35b","pledgeId":"0","ownerId":{"$numberInt":"1"},"ownerTypeId":"0xbFd44dDEFF1394bBBeB572435fb04B507CEeb35b","ownerType":"giver","delegateId":{"$numberInt":"2"},"delegateTypeId":"5c475d761bbf0814e1c72312","intendedProjectId":{"$numberInt":"3"},"intendedProjectTypeId":"5c4764451bbf0814e1c7231f","createdAt":{"$date":{"$numberLong":"1548273405056"}},"updatedAt":{"$date":{"$numberLong":"1548273405056"}},"__v":{"$numberInt":"0"}}
{"_id":{"$oid":"5c48d48c0d8a7d399c7b38e2"},"status":"ToApprove","mined":false,"parentDonations":["5c48d2db0d8a7d399c7b38ce"],"isReturn":false,"txHash":"0x52967c87088d3c580f887c0a4df61ffb5985653b33c81c93b723458434c405e3","amount":"15000000000000000","amountRemaining":"15000000000000000","giverAddress":"0x492f6fA8A99576639f731F4b4C4c0B911DB39872","pledgeId":"0","ownerId":{"$numberInt":"5"},"ownerTypeId":"0x492f6fA8A99576639f731F4b4C4c0B911DB39872","ownerType":"giver","delegateId":{"$numberInt":"6"},"delegateTypeId":"5c48cb4c0d8a7d399c7b38b9","intendedProjectId":{"$numberInt":"8"},"intendedProjectTypeId":"5c48d0b90d8a7d399c7b38c0","createdAt":{"$date":{"$numberLong":"1548276876911"}},"updatedAt":{"$date":{"$numberLong":"1548276876911"}},"__v":{"$numberInt":"0"}}
{"_id":{"$oid":"5c48f1a20d8a7d399c7b38f6"},"status":"Failed","mined":true,"parentDonations":["5c48d3680d8a7d399c7b38d8"],"isReturn":false,"txHash":"0x913e817f53ad6af747398ac1c2624b0dc2aa364b8250d4a6ba5c7239a85604b7","amount":"1000000000000000000000","amountRemaining":"1000000000000000000000","giverAddress":"0x492f6fA8A99576639f731F4b4C4c0B911DB39872","pledgeId":"0","ownerId":{"$numberInt":"5"},"ownerTypeId":"0x492f6fA8A99576639f731F4b4C4c0B911DB39872","ownerType":"giver","delegateId":{"$numberInt":"6"},"delegateTypeId":"5c48cb4c0d8a7d399c7b38b9","intendedProjectId":{"$numberInt":"7"},"intendedProjectTypeId":"5c48ce9f0d8a7d399c7b38bd","createdAt":{"$date":{"$numberLong":"1548284323001"}},"updatedAt":{"$date":{"$numberLong":"1548291990413"}},"__v":{"$numberInt":"0"}}
BN is still sometimes used and can cause issues. See Giveth@2c2fe6f and the corresponding issue Giveth#638
All the uploads to the server should instead go to IPFS and IPFS hash should be stored in contracts (where available) or send to the feathers service directly. The reason is that IPFS service works just fine while uploading files to the server directly is challenging in terms of configuration.
This will later on allow us to completely remove any patching of feathers from the UI making it nice unidirectional data flow.
We haven't implemented IPFS uploads for Milestone uploads and this is necessary for #2
There is a problem with processing the Mark Milestone Complete transaction. It right away gets 10 confirmations and is processed not updating the database correctly. This is only problem on testnet.
Error on the UI is thrown
Description of the Error:
Something went wrong with the transaction.
Transaction link:
https://explorer.testnet.rsk.co/tx/0xfa918695d8f19cfb0b63ae626a1e060654d604547b2aff6d963570c59d3d1f60 => {}
The event emitted:
{"_id":"5c4b6e2dade73d4981f5c476","topics":[],"status":"Processed","logIndex":0,"blockNumber":272784,"blockHash":"0xf5fde30de2618b0c237410fa0446287a6fd3750b2866e5ab8f4fdec91da423eb","transactionHash":"0x02195eaef691ea252f1fd133a25c1c987884c2745ab3215f23ebbbac0927a737","transactionIndex":1,"address":"0x978da5cBb6DDb266cC0240A4E228C14e6e54d3ba","id":"log_89c68ec4","returnValues":{"0":"0xeef9Eb24EF8f486A89b552FEa51Ba0118F634c9f","1":"9","liquidPledging":"0xeef9Eb24EF8f486A89b552FEa51Ba0118F634c9f","idProject":"9"},"event":"MilestoneCompleteRequested","signature":"0x6d025f2abdd7590a11156e53c29dcfaf704d2c60aede1e69f91d78fe0bf5a350","raw":{"data":"0x00","topics":["0x6d025f2abdd7590a11156e53c29dcfaf704d2c60aede1e69f91d78fe0bf5a350","0x000000000000000000000000eef9eb24ef8f486a89b552fea51ba0118f634c9f","0x0000000000000000000000000000000000000000000000000000000000000009"]},"confirmations":10,"createdAt":"2019-01-25T20:14:37.583Z","updatedAt":"2019-01-25T20:14:57.945Z","__v":0}
The Milestone data are:
{"_id":"5c4b69bf19c53442a12da0d3","fullyFunded":true,"mined":false,"title":"buying new printer","description":"<p>Going to the shop and buy</p>","image":"/ipfs/QmRGCyTtnBKZ9iPoDyq3w5wy1dsQq29wKDuDfMa8GD9Pta","maxAmount":"100000000000000000000","reviewerAddress":"0xf9a2595bFAe0694f114042679b3A9a536Bb7A5D8","recipientAddress":"0x492f6fA8A99576639f731F4b4C4c0B911DB39872","campaignReviewerAddress":"0x492f6fA8A99576639f731F4b4C4c0B911DB39872","campaignId":"5c4b573819c53442a12da069","status":"Completed","items":[],"conversionRateTimestamp":"2019-01-24T00:00:00.000Z","selectedFiatType":"GTT","date":"2019-01-25T00:00:00.000Z","fiatAmount":100,"conversionRate":1,"pluginAddress":"0x59b48d646B2479d2F3dA8A9680820c541AF7Be34","token":{"_id":"5c4b6e61ade73d4981f5c53e","name":"Giveth Test Token","address":"0xe931ce3676b982678Be2061feAf319Bd53a45035","symbol":"GTT","decimals":"18"},"txHash":"0x671f86698421b463e2be4e672f244dfd13cc7e47c504edd6ed5ddff119e1932f","ownerAddress":"0x492f6fA8A99576639f731F4b4C4c0B911DB39872","donationCounters":[{"_id":"5c4b6e63ade73d4981f5c543","name":"Giveth Test Token","address":"0xe931ce3676b982678Be2061feAf319Bd53a45035","decimals":"18","symbol":"GTT","totalDonated":"100000000000000000000","currentBalance":"100000000000000000000","donationCount":1}],"proofItems":[],"createdAt":"2019-01-25T19:55:43.608Z","updatedAt":"2019-01-25T20:29:37.625Z","__v":0,"projectId":"13","url":"","peopleCount":1,"message":"<p>I saw the printer</p>","prevStatus":"NeedsReview"}
This is UX nightmare that even I struggle with. When donating tokens, it require 2 transactions but after clicking the first one nothing happens until the transaction is mined. This takes up to 2 minutes on RSK.
If time permits we should dim the screen with a msg similar to the signin.
It could even have a progress info like:
When I press the donate button It's keep loading without any other feedback, on the web or metamask
I have checked the js console log and I get this error
´´´
Error: Error: [number-to-bn] while converting number undefined to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported. Given value: "undefined"
´´´
I have tried with the following donation values
0.0001
0.0005
0.001
0.0025
Feathers
0|dapp-fea | 2019-01-25 20:05: info: Checking new events between blocks 275274-275275
0|dapp-fea | 2019-01-25 20:05: info: error: donations - Method: create - donations validation failed: ownerType: Path `ownerType` is required.
0|dapp-fea | 2019-01-25 20:05: error: donations validation failed: ownerType: Path `ownerType` is required. {"type":"FeathersError","name":"BadRequest","code":400,"className":"bad-request","errors":{"ownerType":{"message":"Path `ownerType` is required.","name":"ValidatorError","properties":{"message":"Path `{PATH}` is required.","type":"required","path":"ownerType"},"kind":"required","path":"ownerType","$isValidatorError":true}},"timestamp":"2019-01-25T20:05:08.652Z"}
UI Report
Description of the Error:
Unable to update the donation in feathers
Error name:
donations validation failed: ownerType: Path `ownerType` is required.
Error lineNumber:
undefined
Error fileName:
undefined
Error stack:
BadRequest: donations validation failed: ownerType: Path `ownerType` is required.
at new s (https://dapp.giveth.site/static/js/main.a4204dc1.js:1:107376)
at convert (https://dapp.giveth.site/static/js/main.a4204dc1.js:1:109468)
at r.<anonymous> (https://dapp.giveth.site/static/js/main.a4204dc1.js:1:1792715)
at r.onack (https://dapp.giveth.site/static/js/main.a4204dc1.js:1:1859506)
at r.onpacket (https://dapp.giveth.site/static/js/main.a4204dc1.js:1:1858912)
at r.<anonymous> (https://dapp.giveth.site/static/js/main.a4204dc1.js:1:1860963)
at r.emit (https://dapp.giveth.site/static/js/main.a4204dc1.js:1:1813269)
at r.ondecoded (https://dapp.giveth.site/static/js/main.a4204dc1.js:1:1819325)
at o.<anonymous> (https://dapp.giveth.site/static/js/main.a4204dc1.js:1:1860963)
at o.r.emit (https://dapp.giveth.site/static/js/main.a4204dc1.js:1:1813269)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.