Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 8241bb6

Browse files
authored
Merge pull request #2604 from w3f/will-v3.0.17
fix nominator without current targets
2 parents 49b3314 + d74c3e4 commit 8241bb6

File tree

12 files changed

+22
-13
lines changed

12 files changed

+22
-13
lines changed

apps/1kv-backend-staging/templates/kusama-otv-backend.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
source:
1818
repoURL: https://w3f.github.io/helm-charts/
1919
chart: otv-backend
20-
targetRevision: v3.0.16
20+
targetRevision: v3.0.17
2121
plugin:
2222
env:
2323
- name: HELM_VALUES

apps/1kv-backend-staging/templates/polkadot-otv-backend.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
source:
1818
repoURL: https://w3f.github.io/helm-charts/
1919
chart: otv-backend
20-
targetRevision: v3.0.16
20+
targetRevision: v3.0.17
2121
plugin:
2222
env:
2323
- name: HELM_VALUES

apps/1kv-backend/templates/kusama-otv-backend.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
source:
1818
repoURL: https://w3f.github.io/helm-charts/
1919
chart: otv-backend
20-
targetRevision: v3.0.16
20+
targetRevision: v3.0.17
2121
plugin:
2222
env:
2323
- name: HELM_VALUES

apps/1kv-backend/templates/polkadot-otv-backend.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
source:
1818
repoURL: https://w3f.github.io/helm-charts/
1919
chart: otv-backend
20-
targetRevision: v3.0.16
20+
targetRevision: v3.0.17
2121
plugin:
2222
env:
2323
- name: HELM_VALUES

charts/otv-backend/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
description: 1K Validators Backend
22
name: otv-backend
3-
version: v3.0.16
4-
appVersion: v3.0.16
3+
version: v3.0.17
4+
appVersion: v3.0.17
55
apiVersion: v2

packages/common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@1kv/common",
3-
"version": "3.0.16",
3+
"version": "3.0.17",
44
"description": "Services for running the Thousand Validator Program.",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",

packages/common/src/db/queries/Nominator.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,16 @@ export const setLastNomination = async (
183183
};
184184

185185
export const getCurrentTargets = async (address: string): Promise<any[]> => {
186-
return (await NominatorModel.findOne({ address }).lean()).current;
186+
try {
187+
const nominator = await NominatorModel.findOne({ address }).lean();
188+
if (nominator) {
189+
return nominator?.current;
190+
} else {
191+
return [];
192+
}
193+
} catch (e) {
194+
logger.error(e.toString());
195+
}
187196
};
188197

189198
export const allNominators = async (): Promise<any[]> => {

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@1kv/core",
3-
"version": "3.0.16",
3+
"version": "3.0.17",
44
"description": "Services for running the Thousand Validator Program.",
55
"main": "index.js",
66
"scripts": {

packages/core/src/scorekeeper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ export default class ScoreKeeper {
363363
bonded: bonded,
364364
now: now,
365365
proxyDelay: proxyDelay,
366-
payee: payee,
366+
rewardDestination: payee,
367367
};
368368
try {
369369
await queries.addNominator(nominator);

packages/gateway/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@1kv/gateway",
3-
"version": "3.0.16",
3+
"version": "3.0.17",
44
"description": "Services for running the Thousand Validator Program.",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",

0 commit comments

Comments
 (0)