diff --git a/src/extensions/staking/src/api.ts b/src/extensions/staking/src/api.ts
index a5dad45..aeb3181 100644
--- a/src/extensions/staking/src/api.ts
+++ b/src/extensions/staking/src/api.ts
@@ -8,6 +8,7 @@ export const getDelegationProvidersRequest = async (provider: ApiNetworkProvider
(r: any) =>
({
...r,
+ contract: r.provider,
stake: new BigNumber(res.stake || 0),
delegationCap: new BigNumber(res.delegationCap || 0),
} as DelegationProvider)
diff --git a/src/extensions/staking/src/delegation/DelegationsSection.tsx b/src/extensions/staking/src/delegation/DelegationsSection.tsx
index 96d3189..1f20de8 100644
--- a/src/extensions/staking/src/delegation/DelegationsSection.tsx
+++ b/src/extensions/staking/src/delegation/DelegationsSection.tsx
@@ -42,4 +42,4 @@ export const DelegationsSection = (props: Props) => (
)
const findProvider = (providers: DelegationProvider[], contract: string) =>
- providers.find((provider) => provider.provider === contract) || null
+ providers.find((provider) => provider.contract === contract) || null
diff --git a/src/extensions/staking/src/delegation/_DelegateProviderList.tsx b/src/extensions/staking/src/delegation/_DelegateProviderList.tsx
index 20840eb..8990760 100644
--- a/src/extensions/staking/src/delegation/_DelegateProviderList.tsx
+++ b/src/extensions/staking/src/delegation/_DelegateProviderList.tsx
@@ -34,7 +34,7 @@ export const _DelegateProviderList = (props: Props) => (
{props.providers.map((provider) => (
props.onSelect(provider)}
className="flex w-full hover:bg-gray-200 dark:hover:bg-gray-700"
diff --git a/src/extensions/staking/src/delegation/_DelegationsRow.tsx b/src/extensions/staking/src/delegation/_DelegationsRow.tsx
index dbfdb4b..c2c7885 100644
--- a/src/extensions/staking/src/delegation/_DelegationsRow.tsx
+++ b/src/extensions/staking/src/delegation/_DelegationsRow.tsx
@@ -24,12 +24,12 @@ export const _DelegationsRow = (props: Props) => {
const handleRewardClaim = (e: SyntheticEvent) => {
e.stopPropagation()
- app.requestProposalAction(props.provider!.provider, Config.Endpoints.ClaimRewards, 0, [], [])
+ app.requestProposalAction(props.provider!.contract, Config.Endpoints.ClaimRewards, 0, [], [])
}
const handleRewardStake = (e: SyntheticEvent) => {
e.stopPropagation()
- app.requestProposalAction(props.provider!.provider, Config.Endpoints.ReDelegateRewards, 0, [], [])
+ app.requestProposalAction(props.provider!.contract, Config.Endpoints.ReDelegateRewards, 0, [], [])
}
return (
diff --git a/src/extensions/staking/src/delegation/_Delegator.tsx b/src/extensions/staking/src/delegation/_Delegator.tsx
index 8c55ead..eac3c41 100644
--- a/src/extensions/staking/src/delegation/_Delegator.tsx
+++ b/src/extensions/staking/src/delegation/_Delegator.tsx
@@ -27,7 +27,7 @@ export const _Delegator = (props: Props) => {
app.showToast('Insufficient balance', 'error')
return
}
- app.requestProposalAction(props.provider.provider, Config.Endpoints.Delegate, valueBig, [], [])
+ app.requestProposalAction(props.provider.contract, Config.Endpoints.Delegate, valueBig, [], [])
}
return (
diff --git a/src/extensions/staking/src/delegation/_Withdrawer.tsx b/src/extensions/staking/src/delegation/_Withdrawer.tsx
index 4cd193a..c5d4a27 100644
--- a/src/extensions/staking/src/delegation/_Withdrawer.tsx
+++ b/src/extensions/staking/src/delegation/_Withdrawer.tsx
@@ -22,7 +22,7 @@ export const _Withdrawer = (props: Props) => {
app.showToast('Can not unstake more than is staked', 'error')
return
}
- app.requestProposalAction(props.provider.provider, Config.Endpoints.UnDelegate, 0, [valueBig], [])
+ app.requestProposalAction(props.provider.contract, Config.Endpoints.UnDelegate, 0, [valueBig], [])
}
return (
diff --git a/src/extensions/staking/src/types.ts b/src/extensions/staking/src/types.ts
index 265f7f7..a598d44 100644
--- a/src/extensions/staking/src/types.ts
+++ b/src/extensions/staking/src/types.ts
@@ -5,7 +5,7 @@ export type DelegationProvider = {
stake: BigNumber
topUp: string
locked: string
- provider: string
+ contract: string
owner: string
featured: boolean
serviceFee: number