File tree 3 files changed +32
-0
lines changed
3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -352,6 +352,14 @@ function FocusedView(props: FocusViewProps) {
352
352
? moment ( wanted ?. estimated_completion_date )
353
353
: '' ;
354
354
355
+ if ( wanted . is_stakable !== undefined ) {
356
+ initialValues . isStakable = wanted . is_stakable ;
357
+ }
358
+
359
+ if ( wanted . stake_min !== undefined ) {
360
+ initialValues . stakeMin = wanted . stake_min . toString ( ) ;
361
+ }
362
+
355
363
if ( wanted . type ) {
356
364
const thisDynamicSchema = dynamicSchemasByType [ wanted . type ] ;
357
365
const newValues = thisDynamicSchema . map ( ( s : any ) => {
@@ -379,6 +387,14 @@ function FocusedView(props: FocusViewProps) {
379
387
return {
380
388
[ s . name ] : wanted [ 'feature_uuid' ] || feature_uuid || ''
381
389
} ;
390
+ } else if ( s . name === 'isStakable' ) {
391
+ return {
392
+ [ s . name ] : initialValues . isStakable
393
+ } ;
394
+ } else if ( s . name === 'stakeMin' ) {
395
+ return {
396
+ [ s . name ] : initialValues . stakeMin
397
+ } ;
382
398
}
383
399
return {
384
400
[ s . name ] : wanted [ s . name ]
Original file line number Diff line number Diff line change @@ -123,6 +123,10 @@ export interface PersonBounty {
123
123
text_snippet_id ?: string ;
124
124
access_restriction ?: string ;
125
125
unlock_code ?: string ;
126
+ is_stakable ?: boolean ;
127
+ stake_min ?: number ;
128
+ max_stakers ?: number ;
129
+ current_stakers ?: number ;
126
130
}
127
131
128
132
export type WorkspaceTransactionType = 'deposit' | 'payment' | 'withdraw' | 'failed' | 'pending' ;
Original file line number Diff line number Diff line change @@ -1753,6 +1753,18 @@ export class MainStore {
1753
1753
body . coding_languages = languages ;
1754
1754
}
1755
1755
1756
+ if ( body . isStakable !== undefined ) {
1757
+ body . is_stakable = body . isStakable ;
1758
+ delete body . isStakable ;
1759
+ }
1760
+
1761
+ if ( body . stakeMin !== undefined ) {
1762
+ body . stake_min = parseInt ( body . stakeMin , 10 ) || 0 ;
1763
+ delete body . stakeMin ;
1764
+ }
1765
+
1766
+ body . max_stakers = body . max_stakers || 1 ;
1767
+
1756
1768
// eslint-disable-next-line no-useless-catch
1757
1769
try {
1758
1770
const request = `gobounties?token=${ info ?. tribe_jwt } ` ;
You can’t perform that action at this time.
0 commit comments