Skip to content

Commit

Permalink
add enable_trading_rewards feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-dydx committed Dec 5, 2023
1 parent eb3c12d commit 405450c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public enum dydxBoolFeatureFlag: String, CaseIterable {
case full_story
case force_mainnet
case enable_cctp
case enable_trading_rewards

private static let obj = NSObject()

Expand Down
20 changes: 20 additions & 0 deletions dydx/dydxPresenters/dydxPresenters/_Features/features.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,26 @@
]
}
},
{
"title":{
"text":"Enable Trading Rewards"
},
"field":{
"field":"enable_trading_rewards",
"optional":true,
"type" : "text",
"options" : [
{
"text": "yes",
"value" : "1"
},
{
"text": "no",
"value" : "0"
}
]
}
},
{
"title":{
"text":"Push Notification"
Expand Down
10 changes: 6 additions & 4 deletions dydx/dydxViews/dydxViews/_v4/Profile/dydxProfileView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import SwiftUI
import PlatformUI
import Utilities
import dydxFormatter

public class dydxProfileViewModel: PlatformViewModel {
@Published public var header = dydxProfileHeaderViewModel()
Expand Down Expand Up @@ -48,11 +49,12 @@ public class dydxProfileViewModel: PlatformViewModel {
HStack(spacing: 14) {
self.fees?
.createView(parentStyle: style)
//TODO, comment in when abacus is ready
// self.rewards?
// .createView(parentStyle: style)
if dydxBoolFeatureFlag.enable_trading_rewards.isEnabled {
self.rewards?
.createView(parentStyle: style)
}
}

self.history?
.createView(parentStyle: style)

Expand Down

0 comments on commit 405450c

Please sign in to comment.