LtbLightning / bdk-rn

Bitcoin Development Kit - React Native Module
MIT License
50 stars 15 forks source link

BlockChainConfig number types causing runtime errors #55

Closed Czino closed 1 year ago

Czino commented 1 year ago

https://github.com/LtbLightning/bdk-rn/pull/50 causing the following error when adhering to blockchain config type definitions:

JSON value '5' of type NSNumber cannot be converted to NSString

My erroneous config:

const config: BlockchainEsploraConfig = {
          baseUrl: BLOCKEXPLORER,
          proxy: '',
          concurrency: 2,
          timeout: 10,
          stopGap: 25,
}

Working config (but with type errors):

const config: BlockchainEsploraConfig = {
          baseUrl: BLOCKEXPLORER,
          proxy: '',
          concurrency: '2',
          timeout: '10',
          stopGap: '25',
}
Czino commented 1 year ago

False alarm, I had 2 simulators open, one with the new update and another with the old, was looking at the old one 🤦