Skip to content

Commit

Permalink
revert elevation/azimuth until we figure out CBRS (#671)
Browse files Browse the repository at this point in the history
* revert elevation/azimuth until we figure out CBRS

* Fix js
  • Loading branch information
ChewingGlass authored Jun 26, 2024
1 parent 8506199 commit b036bb5
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,13 @@ export async function onboardMobileHotspot({
payer,
dcFeePayer,
deviceType = "cbrs",
elevation,
azimuth,
...rest
}: {
program: Program<HeliumEntityManager>;
payer?: PublicKey;
dcFeePayer?: PublicKey;
assetId: PublicKey;
location?: BN;
elevation?: number;
azimuth?: number;
rewardableEntityConfig: PublicKey;
maker: PublicKey;
dao: PublicKey;
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export async function updateMobileMetadata({
dcFeePayer,
payer,
dao = HELIUM_DAO,
elevation,
azimuth,
...rest
}: {
program: Program<HeliumEntityManager>;
Expand All @@ -26,8 +24,6 @@ export async function updateMobileMetadata({
location: BN | null;
assetId: PublicKey;
rewardableEntityConfig: PublicKey;
elevation?: number;
azimuth?: number;
dao?: PublicKey
} & Omit<ProofArgsAndAccountsArgs, "connection">) {
const {
Expand Down Expand Up @@ -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({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ pub struct OnboardMobileHotspotArgsV0 {
pub index: u32,
pub location: Option<u64>,
pub device_type: MobileDeviceTypeV0,
pub elevation: Option<i32>,
pub azimuth: Option<u16>,
}

#[derive(Accounts)]
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ pub struct UpdateMobileInfoArgsV0 {
pub creator_hash: [u8; 32],
pub root: [u8; 32],
pub index: u32,
pub elevation: Option<i32>,
pub azimuth: Option<u16>,
}

#[derive(Accounts)]
Expand Down Expand Up @@ -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(())
}
2 changes: 0 additions & 2 deletions programs/helium-entity-manager/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,6 @@ pub struct MobileHotspotInfoV0 {
pub is_active: bool,
pub dc_onboarding_fee_paid: u64,
pub device_type: MobileDeviceTypeV0,
pub elevation: Option<i32>,
pub azimuth: Option<u16>,
}
pub const MOBILE_HOTSPOT_INFO_SIZE: usize = 8 +
32 + // asset
Expand Down
6 changes: 0 additions & 6 deletions tests/helium-entity-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -839,17 +839,13 @@ describe("helium-entity-manager", () => {

it("changes the metadata", async () => {
const location = new BN(1000);
const elevation = 10;
const azimuth = 5;

const method = (
await updateMobileMetadata({
program: hemProgram,
assetId: hotspot,
rewardableEntityConfig,
location,
elevation,
azimuth,
getAssetFn,
getAssetProofFn,
})
Expand All @@ -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 () => {
Expand Down

0 comments on commit b036bb5

Please sign in to comment.