neuron icon indicating copy to clipboard operation
neuron copied to clipboard

refactor: replace toUint64Le, parseEpoch from ckbCore.utils with lumos

Open twhy opened this issue 1 year ago • 2 comments

twhy avatar Apr 30 '24 06:04 twhy

While refactoring, it is better to keep the ckbCore as it is to let the reviewer know that all the uint64-related encoding has been completed

declare const originalCkbCore;

export const ckbCore = {
  someMethod: originalCkbCore.someMethod.bind(originalCkbCore),
  // ...
  utils: {
    toUint64() {
      // return ...
    }
  }
}

homura avatar Apr 30 '24 07:04 homura

While refactoring, it is better to keep the ckbCore as it is to let the reviewer know that all the uint64-related encoding has been completed

declare const originalCkbCore;

export const ckbCore = {
  someMethod: originalCkbCore.someMethod.bind(originalCkbCore),
  // ...
  utils: {
    toUint64() {
      // return ...
    }
  }
}

@homura After checking the code, I realized we probably don't need to add a proxy ckbCore to get this refactor done.

The ckbCore object is still there. This screenshot shows the changes more clearly. And all uint64-related encoding has been completed in this PR.

image

twhy avatar Apr 30 '24 07:04 twhy

@Keith-CY Let's merge this.

twhy avatar May 06 '24 02:05 twhy