Skip to content

Commit

Permalink
fixed merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Egge21M committed Nov 26, 2024
1 parent 16e4827 commit 3493c68
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 61 deletions.
23 changes: 0 additions & 23 deletions src/legacy/cashu-ts.ts

This file was deleted.

23 changes: 0 additions & 23 deletions test/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,27 +471,4 @@ describe('dleq', () => {
const exc = await wallet.receive(token, { requireDleq: true }).catch((e) => e);
expect(exc).toEqual(new Error('Token contains proofs with invalid DLEQ'));
});

test('mint and melt p2pk', async () => {
const mint = new CashuMint(mintUrl);
const wallet = new CashuWallet(mint);

const privKeyBob = secp256k1.utils.randomPrivateKey();
const pubKeyBob = secp256k1.getPublicKey(privKeyBob);

const mintRequest = await wallet.createMintQuote(3000);

const proofs = await wallet.mintTokens(3000, mintRequest.quote, {
pubkey: bytesToHex(pubKeyBob)
});

const meltRequest = await wallet.createMeltQuote(externalInvoice);
const fee = meltRequest.fee_reserve;
expect(fee).toBeGreaterThan(0);
const response = await wallet.meltTokens(meltRequest, proofs.proofs, {
privkey: bytesToHex(privKeyBob)
});
expect(response).toBeDefined();
expect(response.isPaid).toBe(true);
});
});
15 changes: 0 additions & 15 deletions test/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,6 @@ for (let i = 1; i <= 0x10000; i *= 16) {
keys_base16[i] = 'deadbeef';
}

const keys: Keys = {};
for (let i = 1; i <= 2048; i *= 2) {
keys[i] = 'deadbeef';
}

const keys_base10: Keys = {};
for (let i = 1; i <= 10000; i *= 10) {
keys_base10[i] = 'deadbeef';
}

const keys_base16: Keys = {};
for (let i = 1; i <= 0x10000; i *= 16) {
keys_base16[i] = 'deadbeef';
}

describe('test split amounts ', () => {
test('testing amount 2561', async () => {
const chunks = utils.splitAmount(2561, keys);
Expand Down

0 comments on commit 3493c68

Please sign in to comment.