feat: daily reward

Adds range to reward tile, updates lbryinc which checks the reward
This commit is contained in:
Thomas Zarebczan 2019-09-04 17:37:28 -04:00 committed by Sean Yesmunt
parent 4a1f51a722
commit 997fdfe789
5 changed files with 9 additions and 6 deletions

View file

@ -4,6 +4,7 @@ declare type Reward = {
created_at: string, created_at: string,
id: number, id: number,
reward_amount: number, reward_amount: number,
reward_range?: string,
reward_description: string, reward_description: string,
reward_notification: string, reward_notification: string,
reward_title: string, reward_title: string,

View file

@ -131,7 +131,7 @@
"json-loader": "^0.5.4", "json-loader": "^0.5.4",
"lbry-format": "https://github.com/lbryio/lbry-format.git", "lbry-format": "https://github.com/lbryio/lbry-format.git",
"lbry-redux": "lbryio/lbry-redux#2b3a5a59907f34d4e1c005c4696282b58d626242", "lbry-redux": "lbryio/lbry-redux#2b3a5a59907f34d4e1c005c4696282b58d626242",
"lbryinc": "lbryio/lbryinc#1ce266b3c52654190b955e9c869b8e302aa5c585", "lbryinc": "lbryio/lbryinc#534f02e54ab93585d3dcab6a6cc708117978e454",
"lint-staged": "^7.0.2", "lint-staged": "^7.0.2",
"localforage": "^1.7.1", "localforage": "^1.7.1",
"lodash-es": "^4.17.14", "lodash-es": "^4.17.14",

View file

@ -4,6 +4,7 @@ import Button from 'component/button';
type Reward = { type Reward = {
reward_amount: number, reward_amount: number,
reward_range: string,
}; };
type Props = { type Props = {
@ -20,7 +21,7 @@ const RewardLink = (props: Props) => {
<Button <Button
button={button ? 'inverse' : 'link'} button={button ? 'inverse' : 'link'}
disabled={isPending} disabled={isPending}
label={isPending ? __('Claiming...') : label || `${__('Get')} ${reward.reward_amount} LBC`} label={isPending ? __('Claiming...') : label || `${__('Get')} ${reward.reward_range || reward.reward_amount} LBC`}
onClick={() => { onClick={() => {
claimReward(reward); claimReward(reward);
}} }}

View file

@ -12,6 +12,7 @@ type Props = {
id: string, id: string,
reward_title: string, reward_title: string,
reward_amount: number, reward_amount: number,
reward_range?: string,
transaction_id: string, transaction_id: string,
created_at: string, created_at: string,
reward_description: string, reward_description: string,

View file

@ -7179,17 +7179,17 @@ lazy-val@^1.0.3, lazy-val@^1.0.4:
yargs "^13.2.2" yargs "^13.2.2"
zstd-codec "^0.1.1" zstd-codec "^0.1.1"
lbry-redux@lbryio/lbry-redux#a2ef019c694e7d3c415336b1362779e37f2dc8e4: lbry-redux@lbryio/lbry-redux#2b3a5a59907f34d4e1c005c4696282b58d626242:
version "0.0.1" version "0.0.1"
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/a2ef019c694e7d3c415336b1362779e37f2dc8e4" resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/2b3a5a59907f34d4e1c005c4696282b58d626242"
dependencies: dependencies:
proxy-polyfill "0.1.6" proxy-polyfill "0.1.6"
reselect "^3.0.0" reselect "^3.0.0"
uuid "^3.3.2" uuid "^3.3.2"
lbryinc@lbryio/lbryinc#1ce266b3c52654190b955e9c869b8e302aa5c585: lbryinc@lbryio/lbryinc#534f02e54ab93585d3dcab6a6cc708117978e454:
version "0.0.1" version "0.0.1"
resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/1ce266b3c52654190b955e9c869b8e302aa5c585" resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/534f02e54ab93585d3dcab6a6cc708117978e454"
dependencies: dependencies:
reselect "^3.0.0" reselect "^3.0.0"