diff --git a/dydx/Podfile.lock b/dydx/Podfile.lock index 4a71328ec..1c639f726 100644 --- a/dydx/Podfile.lock +++ b/dydx/Podfile.lock @@ -445,4 +445,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 9e6e5d5e9ea0594fa77a099c8fd30545318f1cb9 -COCOAPODS: 1.14.3 +COCOAPODS: 1.15.2 diff --git a/dydx/Pods/Manifest.lock b/dydx/Pods/Manifest.lock index 4a71328ec..1c639f726 100644 --- a/dydx/Pods/Manifest.lock +++ b/dydx/Pods/Manifest.lock @@ -445,4 +445,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 9e6e5d5e9ea0594fa77a099c8fd30545318f1cb9 -COCOAPODS: 1.14.3 +COCOAPODS: 1.15.2 diff --git a/dydx/dydxPresenters/dydxPresenters/_v4/Profile/Components/dydxProfileBalancesViewPresenter.swift b/dydx/dydxPresenters/dydxPresenters/_v4/Profile/Components/dydxProfileBalancesViewPresenter.swift index 8700410b8..02429e782 100644 --- a/dydx/dydxPresenters/dydxPresenters/_v4/Profile/Components/dydxProfileBalancesViewPresenter.swift +++ b/dydx/dydxPresenters/dydxPresenters/_v4/Profile/Components/dydxProfileBalancesViewPresenter.swift @@ -32,10 +32,16 @@ public class dydxProfileBalancesViewPresenter: HostedViewPresenter AnyPublisher { + public func stakingBalance(of tokenDenom: String?) -> AnyPublisher { account .map { account in - self.parser.asDecimal(account?.stakingBalances?[tokenDenom]?.amount)?.doubleValue + self.parser.asDecimal(account?.stakingBalances?[tokenDenom ?? ""]?.amount)?.doubleValue } .removeDuplicates() .share()