Skip to content

Commit

Permalink
Remove usage of validator nodeAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Oct 29, 2024
1 parent 30966cf commit 8765987
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 20 deletions.
5 changes: 0 additions & 5 deletions playwright/utils/mockApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ export async function mockApiMoreData(context: BrowserContext | Page) {
entityId: 'zAhtGrpk1L3bBLaP5enm3natUTCoj7MEFryq9+MG4tE=',
entityAddress: 'oasis1qq0xmq7r0z9sdv02t5j9zs7en3n6574gtg8v9fyt',
nodeId: 'PsfFUQrXqGoFtowWZcoc8ilh8xHP94LvNYHvqQHpw1E=',
nodeAddress: 'oasis1qqnucpyju04fjxlg5j5a0akscqhf34ulnsupnwx3',
name: 'Mars Staking | Long term fee 1%',
icon: 'https://s3.amazonaws.com/keybase_processed_uploads/f30f9b2207b7d83ef05219ca483b6f05_360_360.jpg',
website: 'https://linktr.ee/marssuper',
Expand Down Expand Up @@ -245,7 +244,6 @@ export async function mockApiMoreData(context: BrowserContext | Page) {
entityId: 'eZuacXy5s3/nolB/E3gF4vqUYdvfOlVaaBXGfZcGwKc=',
entityAddress: 'oasis1qq3xrq0urs8qcffhvmhfhz4p0mu7ewc8rscnlwxe',
nodeId: 'SQZZd1wsWXdFsqswUoh6hZtmzu+ejuSnrGeHtgIBJDo=',
nodeAddress: 'oasis1qphhk4g0ncqut2ds40mr932s5p8tkqcu3yaae227',
name: 'stakefish',
icon: 'https://s3.amazonaws.com/keybase_processed_uploads/e1378cd4d5203ded716906687ad53905_360_360.jpg',
website: 'https://stake.fish',
Expand Down Expand Up @@ -279,7 +277,6 @@ export async function mockApiMoreData(context: BrowserContext | Page) {
entityId: '9sAhd+Wi6tG5nAr3LwXD0y9mUKLYqfAbS2+7SZdNHB4=',
entityAddress: 'oasis1qqekv2ymgzmd8j2s2u7g0hhc7e77e654kvwqtjwm',
nodeId: '6wbL5/OxvFGxi55o7AxcwKmfjXbXGC1hw4lfnEZxBXA=',
nodeAddress: 'oasis1qqp0h2h92eev7nsxgqctvuegt8ge3vyg0qyluc4k',
name: 'BinanceStaking',
icon: null,
website: 'https://www.binance.com',
Expand Down Expand Up @@ -313,7 +310,6 @@ export async function mockApiMoreData(context: BrowserContext | Page) {
entityId: 'J2nwlXuYEPNZ0mMH2Phg5RofbZzj65xDvQMNdy9Ji0E=',
entityAddress: 'oasis1qz22xm9vyg0uqxncc667m4j4p5mrsj455c743lfn',
nodeId: 'ITrwEekdZNqXrEzvw3GT6Q3AtHDd51f19nD2nVU/f0c=',
nodeAddress: 'oasis1qzs429ts5f4pvnylnhkhhfgjvtqj35asc5mv68sz',
name: 'S5',
icon: 'https://s3.amazonaws.com/keybase_processed_uploads/de32b7ca9108d3d7de68949f81114205_360_360.jpg',
website: 'https://www.stake5labs.com',
Expand Down Expand Up @@ -347,7 +343,6 @@ export async function mockApiMoreData(context: BrowserContext | Page) {
entityId: '9D+kziTxFhg77+cyt+Fwd6eXREkZ1wHw7WX7VG57MeA=',
entityAddress: 'oasis1qpn83e8hm3gdhvpfv66xj3qsetkj3ulmkugmmxn3',
nodeId: 'SCA1zoR15jpC2eugP1P/CZBQhMjHEtmJ7+hWemgTdWo=',
nodeAddress: 'oasis1qrs74qakgmxcrj4vcvl6javrps65awk6x5656msr',
name: 'Chorus One',
icon: 'https://s3.amazonaws.com/keybase_processed_uploads/3a844f583b686ec5285403694b738a05_360_360.jpg',
website: 'https://chorus.one',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ describe('<ActiveDelegationList />', () => {
rank: 1,
status: 'active',
name: 'test-validator',
nodeAddress: 'oasis1qq7pgk9v8l3hu2aenjtflezy5vajc2cz3y4d96rj',
escrow: 1000n.toString(),
},
},
Expand Down Expand Up @@ -73,7 +72,6 @@ describe('<ActiveDelegationList />', () => {
rank: 1,
status: 'active',
name: 'test-validator1',
nodeAddress: 'oasis1qq7pgk9v8l3hu2aenjtflezy5vajc2cz3y4d96rj',
escrow: 1000n.toString(),
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ describe('<DebondingDelegationList />', () => {
rank: 1,
status: 'active',
name: 'test-validator',
nodeAddress: 'oasis1qq7pgk9v8l3hu2aenjtflezy5vajc2cz3y4d96rj',
escrow: 1000n.toString(),
},
},
Expand Down Expand Up @@ -82,7 +81,6 @@ describe('<DebondingDelegationList />', () => {
rank: 1,
status: 'active',
name: 'test-validator1',
nodeAddress: 'oasis1qq7pgk9v8l3hu2aenjtflezy5vajc2cz3y4d96rj',
escrow: 1000n.toString(),
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jest.mock('@oasisprotocol/client/dist/client')

const activeValidator: Validator = {
address: 'oasis1qpc4ze5zzq3aa5mu5ttu4ku4ctp5t6x0asemymfz',
nodeAddress: 'oasis1qpwrtzadlddfuvdhjlta85268ju7dj0flsrfgg5x',
current_rate: 0.1,
rank: 0,
status: 'active',
Expand All @@ -30,7 +29,6 @@ const activeValidator: Validator = {
}
const inactiveValidator: Validator = {
address: 'oasis1qzyqaxestzlum26e2vdgvkerm6d9qgdp7gh2pxqe',
nodeAddress: 'oasis1qrdlqcv3tnv7qzuucnq0fncua52n66x7n5pm3n93',
current_rate: 0.2,
rank: 1,
status: 'inactive',
Expand All @@ -40,7 +38,6 @@ const inactiveValidator: Validator = {
}
const unknownValidator: Validator = {
address: 'oasis1qrfe9n26nq3t6vc9hlu9gnupwf4rm6wr0uglh3r7',
nodeAddress: 'oasis1qq672rjh7mldhaj35mlf4w34m8jtl9vu2c8qspkz',
current_rate: 0.2,
rank: 2,
status: 'unknown',
Expand Down
2 changes: 0 additions & 2 deletions src/app/state/staking/saga.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ describe('Staking Sagas', () => {
rank: 1,
entityAddress: 'oasis1qq3xrq0urs8qcffhvmhfhz4p0mu7ewc8rscnlwxe',
name: 'stakefish',
nodeAddress: 'oasis1qrg52ccz4ts6cct2qu4retxn7kkdlusjh5pe74ar',
escrow: '0.2',
status: true,
_expectedStatus: true,
Expand All @@ -170,7 +169,6 @@ describe('Staking Sagas', () => {
rank: 2,
entityAddress: 'oasis1qqekv2ymgzmd8j2s2u7g0hhc7e77e654kvwqtjwm',
name: 'BinanceStaking',
nodeAddress: 'oasis1qqp0h2h92eev7nsxgqctvuegt8ge3vyg0qyluc4k',
escrow: '0.1',
status: true,
_expectedStatus: false,
Expand Down
1 change: 0 additions & 1 deletion src/app/state/staking/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { StringifiedBigInt } from 'types/StringifiedBigInt'
export interface Validator {
address: string
name?: string
nodeAddress: string
escrow: StringifiedBigInt
status: 'active' | 'inactive' | 'unknown'
rank: number
Expand Down
3 changes: 0 additions & 3 deletions src/vendors/__tests__/oasisscan.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ describe('oasisscan', () => {
entityId: 'eZuacXy5s3/nolB/E3gF4vqUYdvfOlVaaBXGfZcGwKc=',
entityAddress: 'oasis1qq3xrq0urs8qcffhvmhfhz4p0mu7ewc8rscnlwxe',
nodeId: 'ked2iuR80WQdb4g7l+PqbQKGJAvD4+KVPFwuDc5nU6M=',
nodeAddress: 'oasis1qrg52ccz4ts6cct2qu4retxn7kkdlusjh5pe74ar',
name: 's',
icon: 'https://s3.amazonaws.com/s.jpg',
website: 'https://s.f',
Expand Down Expand Up @@ -72,7 +71,6 @@ describe('oasisscan', () => {
entityId: '9sAhd+Wi6tG5nAr3LwXD0y9mUKLYqfAbS2+7SZdNHB4=',
entityAddress: 'oasis1qqekv2ymgzmd8j2s2u7g0hhc7e77e654kvwqtjwm',
nodeId: '6wbL5/OxvFGxi55o7AxcwKmfjXbXGC1hw4lfnEZxBXA=',
nodeAddress: 'oasis1qqp0h2h92eev7nsxgqctvuegt8ge3vyg0qyluc4k',
name: 'b',
icon: null,
website: 'https://www.b.com',
Expand Down Expand Up @@ -106,7 +104,6 @@ describe('oasisscan', () => {
entityId: 'kfr2A6K6TlvhQm4nz88Hczzkd2Aq5PlkxSpnmUUBAFs=',
entityAddress: 'oasis1qr0jwz65c29l044a204e3cllvumdg8cmsgt2k3ql',
nodeId: 'lbxs4hlud9XNloIOdhJPaCahd7HtiY8QATCgGnFfCM0=',
nodeAddress: 'oasis1qp0lt6y2kq8g7ffzy49acga2l8uefngz0yf9v0jk',
name: 'Staking Fund',
icon: 'https://s3.amazonaws.com/keybase_processed_uploads/d48739023a250815c4ac564c9870ec05_360_360.jpg',
website: 'https://staking.fund',
Expand Down
1 change: 0 additions & 1 deletion src/vendors/monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ export function parseValidatorsList(validators: ValidatorRow[]): Validator[] {
const parsed: Validator = {
address: v.account_id,
name: v.account_name,
nodeAddress: v.node_id,
escrow: BigInt(v.escrow_balance).toString(),
current_rate: computeCurrentRate(v.current_epoch!, v.commission_schedule?.rates ?? []),
status: v.status,
Expand Down
1 change: 0 additions & 1 deletion src/vendors/oasisscan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ export function parseValidatorsList(validators: ValidatorRow[]): Validator[] {
const parsed: Validator = {
address: v.entityAddress,
name: v.name ?? undefined,
nodeAddress: v.nodeAddress,
escrow: parseRoseStringToBaseUnitString(v.escrow),
current_rate: v.commission,
status: v.status ? 'active' : 'inactive',
Expand Down

0 comments on commit 8765987

Please sign in to comment.