jaros1 / Money-Network

Demo with complementary and alternative money. Implemented in ZeroNet and AngularJS. Focus on privacy, encryption, max data in client and min data on ZeroNet. Work in progress.
GNU General Public License v2.0
4 stars 4 forks source link

Chat: number of decimals in money transactions #298

Closed jaros1 closed 6 years ago

jaros1 commented 6 years ago

For example max 8 decimals for test bitcoins.

Torando: screenshot from 2017-12-21 17-45-38

Montreal: screenshot from 2017-12-21 17-47-35

jaros1 commented 6 years ago

Added decimals to "units" in "wallet.json" json schema definition

jaros1 commented 6 years ago

See also https://github.com/jaros1/Money-Network/issues/218 Chat: unit in money transaction

jaros1 commented 6 years ago

Change "amount" from number to text to preserve number of decimals in money transactions? JS number can be used with format to selected number of decimals for unit. But maybe easier and more secure to use text?

jaros1 commented 6 years ago

Changed "amount" in json schema defintions. Now allowing number and string (formatted number). Received chat msg with money transaction failed in montreal. Must have missed a json schema definition.

screenshot from 2018-01-09 16-06-39

issue298-test3-montreal-mn.log

Error in ZeroNet source distribution. all.js file (old) was used. Not new all.js.zip. content.json and index.html has correct and using all.js.zip. Cache was disabled in chrome ...

jaros1 commented 6 years ago

Test 5. Received correct in montreal but problems with wallet ping. wallet.json file has been changed (added decimals to units). new wallet_sha256 value. Open W2 in montreal should update wallet.json file with new correct wallet_sha256 values. Not working.

screenshot from 2018-01-09 16-57-22

issue298-test5-montreal-mn.log issue298-test5-montreal-w2.log issue298-test5-montreal-wallet-json.txt

Open W2 should send ping to MN, update user_path and MN should use this user with to read wallet.json file. issue298-test5c-montreal-w2.log issue298-test5c-montreal-mn.log

issue298-test5d-montreal-mn.log issue298-test5d-montreal-w2.log

jaros1 commented 6 years ago

Problem with short timeout in "Could not find wallet info, Open wallet /1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1 to update wallet information?" workround to update wallet.json and update wallet_sha256 info.Using wrong old sessionid for ping and starting next get_currencies request before wallet session has been restored and ping request received from wallet.

issue298-test5e-montreal-mn.log

jaros1 commented 6 years ago

Montreal. Started MN and W2 session. OK MN-W2 session handshake. MN detects changed wallet_sha256 value in get_currencies. Should be easy to find newest updated session and use other_user_path to get wallet.json and new correct wallet_sha256 value

issue298-test5f-montreal-w2.log issue298-test5f-montreal-mn.log

jaros1 commented 6 years ago

Montreal. Approve after changed wallet_sha256 values. Checking looping forever. See get_currencies

screenshot from 2018-01-10 10-32-25 issue298-test5g-montreal-w2.log issue298-test5g-montreal-mn.log

jaros1 commented 6 years ago

Fixed JS error in get_currencies.

screenshot from 2018-01-10 10-48-08

issue298-test5h-montreal-w2.log issue298-test5h-montreal-mn.log

jaros1 commented 6 years ago

Fixed check_mt json error. Was a missing MoneyNetworkAPI update in W2.

screenshot from 2018-01-10 11-38-10 issue298-test5i-montreal-mn.log issue298-test5i-montreal-w2.log

jaros1 commented 6 years ago

issue298-test5j-montreal-w2.log

jaros1 commented 6 years ago

json error in test5k (reloaded w2 sessions after approve money transaction). Error in w2_check_mt JSON. {"message":"Invalid type: string (expected number)"

issue298-test5k-montreal-w2.log

jaros1 commented 6 years ago

Test5L: JS exception. money_transaction.amount.toFixed is not a function

issue298-test5l-torando-mn.log issue298-test5l-torando-w2.log issue298-test5l-montreal-mn.log issue298-test5l-montreal-w2.log

jaros1 commented 6 years ago

Test 5M. Money transaction OK. Maybe a publish too much in MN session in Montreal? Publish in MN after receiving a waiting_for_file message. Why publish?

issue298-test5m-montreal-mn.log issue298-test5m-montreal-w2.log issue298-test5m-torando-mn.log issue298-test5m-torando-w2.log

Test OK. Publish after receiving waiting_for_file message in MN should have been removed now.

jaros1 commented 6 years ago

Test 6: Approved incoming money transaction in montreal. OK UI message about started money transaction. Money transaction is hanging.

issue298-test6a-torando-mn.log issue298-test6a-torando-w2.log issue298-test6a-montreal-mn.log issue298-test6a-montreal-w2.log

Problem with "Rejected incoming message" in both sessions. other_user_path in a MN-W or a W-W session should never change. There must be something wrong with this check. Or maybe ZeroNet is "helping" distributing optional files. Creating seperate issue for this problem