From b036bb5eb07bcb639be5efc0ef484529fc231200 Mon Sep 17 00:00:00 2001 From: Noah Prince <83885631+ChewingGlass@users.noreply.github.com> Date: Wed, 26 Jun 2024 14:35:22 -0700 Subject: [PATCH] revert elevation/azimuth until we figure out CBRS (#671) * revert elevation/azimuth until we figure out CBRS * Fix js --- .../src/functions/onboardMobileHotspot.ts | 6 ------ .../src/functions/updateMobileMetadata.ts | 6 ------ .../src/instructions/onboard_mobile_hotspot_v0.rs | 4 ---- .../src/instructions/update_mobile_info_v0.rs | 10 ---------- programs/helium-entity-manager/src/state.rs | 2 -- tests/helium-entity-manager.ts | 6 ------ 6 files changed, 34 deletions(-) diff --git a/packages/helium-entity-manager-sdk/src/functions/onboardMobileHotspot.ts b/packages/helium-entity-manager-sdk/src/functions/onboardMobileHotspot.ts index 15d6d701f..384219151 100644 --- a/packages/helium-entity-manager-sdk/src/functions/onboardMobileHotspot.ts +++ b/packages/helium-entity-manager-sdk/src/functions/onboardMobileHotspot.ts @@ -19,8 +19,6 @@ export async function onboardMobileHotspot({ payer, dcFeePayer, deviceType = "cbrs", - elevation, - azimuth, ...rest }: { program: Program; @@ -28,8 +26,6 @@ export async function onboardMobileHotspot({ dcFeePayer?: PublicKey; assetId: PublicKey; location?: BN; - elevation?: number; - azimuth?: number; rewardableEntityConfig: PublicKey; maker: PublicKey; dao: PublicKey; @@ -60,8 +56,6 @@ export async function onboardMobileHotspot({ deviceType: { [deviceType]: {}, } as any, - elevation: typeof elevation == "undefined" ? null : elevation, - azimuth: typeof azimuth == "undefined" ? null : azimuth, }) .accounts({ // hotspot: assetId, diff --git a/packages/helium-entity-manager-sdk/src/functions/updateMobileMetadata.ts b/packages/helium-entity-manager-sdk/src/functions/updateMobileMetadata.ts index 41d7cf64e..05321c29e 100644 --- a/packages/helium-entity-manager-sdk/src/functions/updateMobileMetadata.ts +++ b/packages/helium-entity-manager-sdk/src/functions/updateMobileMetadata.ts @@ -16,8 +16,6 @@ export async function updateMobileMetadata({ dcFeePayer, payer, dao = HELIUM_DAO, - elevation, - azimuth, ...rest }: { program: Program; @@ -26,8 +24,6 @@ export async function updateMobileMetadata({ location: BN | null; assetId: PublicKey; rewardableEntityConfig: PublicKey; - elevation?: number; - azimuth?: number; dao?: PublicKey } & Omit) { const { @@ -57,8 +53,6 @@ export async function updateMobileMetadata({ return program.methods .updateMobileInfoV0({ location, - elevation: typeof elevation == "undefined" ? null : elevation, - azimuth: typeof azimuth == "undefined" ? null : azimuth, ...args, }) .accounts({ diff --git a/programs/helium-entity-manager/src/instructions/onboard_mobile_hotspot_v0.rs b/programs/helium-entity-manager/src/instructions/onboard_mobile_hotspot_v0.rs index aeaf5358c..bf1b71b67 100644 --- a/programs/helium-entity-manager/src/instructions/onboard_mobile_hotspot_v0.rs +++ b/programs/helium-entity-manager/src/instructions/onboard_mobile_hotspot_v0.rs @@ -35,8 +35,6 @@ pub struct OnboardMobileHotspotArgsV0 { pub index: u32, pub location: Option, pub device_type: MobileDeviceTypeV0, - pub elevation: Option, - pub azimuth: Option, } #[derive(Accounts)] @@ -196,8 +194,6 @@ pub fn handler<'info>( is_active: false, dc_onboarding_fee_paid: fees.dc_onboarding_fee, device_type: args.device_type, - elevation: args.elevation, - azimuth: args.azimuth, }); if let Some(location) = args.location { diff --git a/programs/helium-entity-manager/src/instructions/update_mobile_info_v0.rs b/programs/helium-entity-manager/src/instructions/update_mobile_info_v0.rs index e96eb790e..6f1267022 100644 --- a/programs/helium-entity-manager/src/instructions/update_mobile_info_v0.rs +++ b/programs/helium-entity-manager/src/instructions/update_mobile_info_v0.rs @@ -25,8 +25,6 @@ pub struct UpdateMobileInfoArgsV0 { pub creator_hash: [u8; 32], pub root: [u8; 32], pub index: u32, - pub elevation: Option, - pub azimuth: Option, } #[derive(Accounts)] @@ -154,13 +152,5 @@ pub fn handler<'info>( } } - if args.elevation.is_some() { - ctx.accounts.mobile_info.elevation = args.elevation; - } - - if args.azimuth.is_some() { - ctx.accounts.mobile_info.azimuth = args.azimuth; - } - Ok(()) } diff --git a/programs/helium-entity-manager/src/state.rs b/programs/helium-entity-manager/src/state.rs index a70ebeb9b..5eb02c328 100644 --- a/programs/helium-entity-manager/src/state.rs +++ b/programs/helium-entity-manager/src/state.rs @@ -232,8 +232,6 @@ pub struct MobileHotspotInfoV0 { pub is_active: bool, pub dc_onboarding_fee_paid: u64, pub device_type: MobileDeviceTypeV0, - pub elevation: Option, - pub azimuth: Option, } pub const MOBILE_HOTSPOT_INFO_SIZE: usize = 8 + 32 + // asset diff --git a/tests/helium-entity-manager.ts b/tests/helium-entity-manager.ts index 941323257..1f4c9f96e 100644 --- a/tests/helium-entity-manager.ts +++ b/tests/helium-entity-manager.ts @@ -839,8 +839,6 @@ describe("helium-entity-manager", () => { it("changes the metadata", async () => { const location = new BN(1000); - const elevation = 10; - const azimuth = 5; const method = ( await updateMobileMetadata({ @@ -848,8 +846,6 @@ describe("helium-entity-manager", () => { assetId: hotspot, rewardableEntityConfig, location, - elevation, - azimuth, getAssetFn, getAssetProofFn, }) @@ -862,8 +858,6 @@ describe("helium-entity-manager", () => { info! ); expect(storageAcc.location?.toNumber()).to.eq(location.toNumber()); - expect(storageAcc.elevation).to.eq(elevation); - expect(storageAcc.azimuth).to.eq(azimuth); }); it("oracle can update active status", async () => {