Open AronVanAmmers opened 8 years ago
In the console:
$scope.backer.userId
"56db21f03ac1b03041ba96aa"
this.$scope.vm.$rootScope.userInfo._id
"56db21f03ac1b03041ba96aa"
So the backend linked this backing to my user ID.
This is due to the unit tests which link the coinbase address to the "test user". As I'm logged in with that user, it sees me as the owner of the backer. However I can't transact with that address.
See Mongo:
{
"_id" : ObjectId("56db21f03ac1b03041ba96aa"),
"name" : "Aron van Ammers",
"externalId" : "RonnieDoubleA",
"accessToken" : "aa5adf1ca27c716a4b3d09095d1f28c57721a8f0",
"blockchainAccounts" : {
"accounts" : [
{
"address" : "0xb02f9b2c56ee0bcf41bb62cfa1def986a41f7e24",
"encrypted" : true,
"locked" : true,
"hash" : "d7dac31bd794118011a0584308b4b8b88aa0d903f11bbbeaba9a1f6e248c1599",
"private" : "U2FsdGVkX19SJJhe7pkzs00OVikfjTqi5I7V/Dw+SgU1kWCNMgP/l4gciSmPIKLJE+wPUevNTj6L8NI1Z8IenAPHOrdGfxwxSYn2R1XH5QVCt+JmnjoO6tAEfXkOK8A6",
"public" : "U2FsdGVkX18piYTbthkiMu7db78DlzETIUv/YYCYoIa4Q/t0ntpDV8vCXPM6jdG0m5yb0tYfrJqRe53P/b/zMCwV1ZPjs5NQwpw9X0KPmjYaeYCHQgfafrmXRXMoxcY2ZsOCgi5F7czUVXkUi6PeFF1Da
WnKNyM4GrcIVOvszV7fodwK5z1B4JcZS8XBt2Ayq9Uo6xoCpoEc8ff5cx6GzA==",
"_id" : ObjectId("56db22173ac1b03041ba96ab"),
"balance" : 39.33288895102006
},
{
"_id" : ObjectId("56db2be7782881b04e93cb04"),
"address" : "0x14489e65998aa87ab1fbc5812d60ca0512e1e4e2"
}
],
"selected" : "0xb02f9b2c56ee0bcf41bb62cfa1def986a41f7e24"
},
"backings" : [
Solution: define an explicit test user for the unit tests, independent of real users.
Priority low as we won't run unit tests on the live database.
The address
0x14...
is listed as mine. This is the coinbase address.However I have only one address,
0xb02...