allow float price (#321)

This commit is contained in:
Bertrand 2021-09-07 03:52:27 +02:00 committed by GitHub
parent e529eee3d5
commit 929a5e2697
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -552,7 +552,7 @@ program
const { keypair } = cmd.opts();
const solPriceStr = cmd.getOptionValue('price') || '1';
const lamports = parseInt(solPriceStr) * LAMPORTS_PER_SOL;
const lamports = Math.ceil(parseFloat(solPriceStr) * LAMPORTS_PER_SOL);
const cacheName = program.getOptionValue('cacheName') || 'temp';
const cachePath = path.join(CACHE_PATH, cacheName);