-
+
@@ -294,9 +352,10 @@ let make = (~address, ~hashtag: Route.account_tab_t) =>
- {totalBalanceRender("TOTAL BAND BALANCE", totalBalance, "BAND")}
+ {totalBalanceRender(isMobile, "TOTAL BAND BALANCE", totalBalance, "BAND")}
{totalBalanceRender(
- "TOTAL BAND IN USD ($" ++ (usdPrice |> Format.fPretty) ++ " / BAND)",
+ isMobile,
+ "TOTAL BAND IN USD \n($" ++ (usdPrice |> Format.fPretty(~digits=2)) ++ " / BAND)",
totalBalance *. usdPrice,
"USD",
)}
diff --git a/scan/src/reusable/AddressRender.re b/scan/src/reusable/AddressRender.re
index 58d472119d..e8d3de580c 100644
--- a/scan/src/reusable/AddressRender.re
+++ b/scan/src/reusable/AddressRender.re
@@ -16,7 +16,12 @@ module Styles = {
let font =
fun
- | Title => style([fontSize(`px(18)), lineHeight(`px(24))])
+ | Title =>
+ style([
+ fontSize(`px(18)),
+ lineHeight(`px(24)),
+ Media.mobile([fontSize(px(14)), lineHeight(`px(18))]),
+ ])
| Subtitle =>
style([
fontSize(`px(14)),
@@ -38,6 +43,11 @@ module Styles = {
active([color(Colors.gray7)]),
]);
+ let wordBreak =
+ fun
+ | Title => style([Media.mobile([wordBreak(`breakAll), whiteSpace(`unset)])])
+ | _ => "";
+
let copy = style([width(`px(15)), marginLeft(`px(10)), cursor(`pointer)]);
};
@@ -59,7 +69,13 @@ let make = (~address, ~position=Text, ~accountType=`account, ~copy=false, ~click
? Route.ValidatorIndexPage(address, Route.ProposedBlocks)
: Route.AccountIndexPage(address, Route.AccountTransactions)
}>
-
+
{prefix |> React.string}
{noPrefixAddress |> React.string}
diff --git a/scan/src/subscriptions/RedelegateSub.re b/scan/src/subscriptions/RedelegateSub.re
index 1f771cd906..5b40f5f953 100644
--- a/scan/src/subscriptions/RedelegateSub.re
+++ b/scan/src/subscriptions/RedelegateSub.re
@@ -25,7 +25,7 @@ module RedelegationByDelegatorConfig = [%graphql
moniker
identity
}
- dstValidator: validator @bsRecord{
+ dstValidator: validatorByValidatorDstId @bsRecord{
operatorAddress: operator_address @bsDecoder(fn: "Address.fromBech32")
moniker
identity
diff --git a/scan/src/subscriptions/UnbondingSub.re b/scan/src/subscriptions/UnbondingSub.re
index 7bbc629066..3e0552b176 100644
--- a/scan/src/subscriptions/UnbondingSub.re
+++ b/scan/src/subscriptions/UnbondingSub.re
@@ -19,9 +19,9 @@ type unbonding_list_t = {
module SingleConfig = [%graphql
{|
- subscription Unbonding($delegator_address: String!) {
+ subscription Unbonding($delegator_address: String!, $current_time: timestamp) {
accounts_by_pk(address: $delegator_address){
- unbonding_delegations_aggregate {
+ unbonding_delegations_aggregate(where: {completion_time: {_gte: $current_time}}) {
aggregate {
sum {
amount @bsDecoder(fn: "GraphQLParser.coinWithDefault")
@@ -48,9 +48,9 @@ module MultiConfig = [%graphql
module UnbondingByValidatorConfig = [%graphql
{|
- subscription Unbonding($delegator_address: String!, $operator_address: String!) {
+ subscription Unbonding($delegator_address: String!, $operator_address: String!, $current_time: timestamp) {
accounts_by_pk(address: $delegator_address) {
- unbonding_delegations_aggregate(where: {validator: {operator_address: {_eq: $operator_address}}}) {
+ unbonding_delegations_aggregate(where: {validator: {operator_address: {_eq: $operator_address}}, completion_time: {_gte: $current_time}}) {
aggregate {
sum {
amount @bsDecoder(fn: "GraphQLParser.coinWithDefault")
@@ -94,12 +94,16 @@ module UnbondingCountByDelegatorConfig = [%graphql
|}
];
-let getUnbondingBalance = delegatorAddress => {
+let getUnbondingBalance = (delegatorAddress, currentTime) => {
let (result, _) =
ApolloHooks.useSubscription(
SingleConfig.definition,
~variables=
- SingleConfig.makeVariables(~delegator_address=delegatorAddress |> Address.toBech32, ()),
+ SingleConfig.makeVariables(
+ ~delegator_address=delegatorAddress |> Address.toBech32,
+ ~current_time=currentTime |> Js.Json.string,
+ (),
+ ),
);
let unbondingInfoSub =
@@ -119,7 +123,7 @@ let getUnbondingBalance = delegatorAddress => {
unbondingInfo |> Sub.resolve;
};
-let getUnbondingBalanceByValidator = (delegatorAddress, operatorAddress) => {
+let getUnbondingBalanceByValidator = (delegatorAddress, operatorAddress, currentTime) => {
let (result, _) =
ApolloHooks.useSubscription(
UnbondingByValidatorConfig.definition,
@@ -127,6 +131,7 @@ let getUnbondingBalanceByValidator = (delegatorAddress, operatorAddress) => {
UnbondingByValidatorConfig.makeVariables(
~delegator_address=delegatorAddress |> Address.toBech32,
~operator_address=operatorAddress |> Address.toOperatorBech32,
+ ~current_time=currentTime |> Js.Json.string,
(),
),
);