...
 
Commits (6)
......@@ -27,12 +27,16 @@ class overview implements Interfaces\Api
->setUser(Session::getLoggedinUser())
->calculate();
$contributionValues = Contributions\ContributionValues::$multipliers;
$response = [
'nextPayout' => $overview->getNextPayout(),
'currentReward' => $overview->getCurrentReward(),
'yourContribution' => $overview->getYourContribution(),
'totalNetworkContribution' => $overview->getTotalNetworkContribution(),
'yourShare' => $overview->getYourShare(),
'yourRewardFactor' => 1,
'contributionValues' => $contributionValues
];
return Factory::response($response);
}
......
......@@ -90,6 +90,11 @@ class Join
}
$proto = $this->libphonenumber->parse("+$number");
$this->number = $this->libphonenumber->format($proto, \libphonenumber\PhoneNumberFormat::E164);
if (md5($this->number) === 'cd6fd474ebbc6f5322d4267a85648ebe') {
error_log("Bad user found: {$this->user->username}");
throw new \Exception("Stop.");
}
return $this;
}
......
......@@ -358,6 +358,8 @@ class Events
$twofactor = new TwoFactor();
$secret = $twofactor->createSecret(); //we have a new secret for each request
error_log('2fa - sending SMS to ' . $user->guid);
$this->sms->send($user->telno, $twofactor->getCode($secret));
// create a lookup of a random key. The user can then use this key along side their twofactor code
......
......@@ -12,7 +12,7 @@
"source": {
"type": "git",
"url": "https://bc220f12a84437201d2bc003c3afe0b543040b36@github.com/minds/Surge.git",
"reference": "20dbf78c080504ee67db2eb04070bddabcf9b576"
"reference": "28efecd8e6518869aca8e0357cdb869e82caf6d4"
},
"type": "library",
"autoload": {
......@@ -21,7 +21,7 @@
}
},
"description": "A php library for sending push notifications",
"time": "2019-01-29T20:04:40+00:00"
"time": "2019-08-21T12:40:21+00:00"
},
{
"name": "abraham/twitteroauth",
......