Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: upgrade alex sdk #5852

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: update alex-sdk in leather.io/query
pete-watters committed Sep 20, 2024
commit 9ea8745c29a6fa462b2254b9d1eecdb003d55fa1
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -141,7 +141,7 @@
"@leather.io/constants": "0.9.2",
"@leather.io/models": "0.14.0",
"@leather.io/crypto": "1.5.0",
"@leather.io/query": "2.10.0",
"@leather.io/query": "2.12.0",
"@leather.io/stacks": "1.1.0",
"@leather.io/tokens": "0.9.0",
"@leather.io/ui": "1.18.0",
172 changes: 122 additions & 50 deletions pnpm-lock.yaml

Unchanged files with check annotations Beta

},
},
btcPublicKey: {
p2tr: bytesToHex(taprootAccount?.mainnet?.keychain.publicKey!),

Check warning on line 30 in src/app/common/authentication/use-legacy-auth-bitcoin-addresses.ts

GitHub Actions / lint-eslint

This assertion is unnecessary since the receiver accepts the original type of the expression
p2wpkh: bytesToHex(nativeSegwitAccount?.mainnet?.keychain.publicKey!),

Check warning on line 31 in src/app/common/authentication/use-legacy-auth-bitcoin-addresses.ts

GitHub Actions / lint-eslint

This assertion is unnecessary since the receiver accepts the original type of the expression
},
btcPublicKeyTestnet: {
p2tr: bytesToHex(taprootAccount?.testnet?.keychain.publicKey!),

Check warning on line 34 in src/app/common/authentication/use-legacy-auth-bitcoin-addresses.ts

GitHub Actions / lint-eslint

This assertion is unnecessary since the receiver accepts the original type of the expression
p2wpkh: bytesToHex(nativeSegwitAccount?.testnet?.keychain.publicKey!),

Check warning on line 35 in src/app/common/authentication/use-legacy-auth-bitcoin-addresses.ts

GitHub Actions / lint-eslint

This assertion is unnecessary since the receiver accepts the original type of the expression
},
};
};
const selected = curSelection && curSelection.rangeCount > 0 ? curSelection.getRangeAt(0) : false;
el.select();
document.execCommand('copy');

Check warning on line 21 in src/app/common/hooks/use-copy-to-clipboard.ts

GitHub Actions / lint-eslint

'execCommand' is deprecated. [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/execCommand)
document.body.removeChild(el);
if (selected) {
document.getSelection()?.removeAllRanges();
export type WaitingMessages = Record<number, string>;
function messageForSecondsPassed(waitingMessages: WaitingMessages, seconds: number) {
return waitingMessages[seconds as keyof typeof waitingMessages];

Check warning on line 9 in src/app/common/hooks/use-waiting-message.ts

GitHub Actions / lint-eslint

This assertion is unnecessary since it does not change the type of the expression
}
export const useWaitingMessage = (
return {
...(result as unknown as CommonSignaturePayload),
message: deserializeCV(Buffer.from(result.message, 'hex')),
domain: deserializeCV(Buffer.from(result.domain, 'hex')) as StructuredMessageDataDomain,

Check warning on line 31 in src/app/common/signature/requests.ts

GitHub Actions / lint-eslint

This assertion is unnecessary since it does not change the type of the expression
};
}
export function isSip10Transfer(tx: StacksTransaction) {
if (!tx.payload || !('functionName' in tx.payload)) return false;
const payload = tx.payload as ContractCallPayload;

Check warning on line 5 in src/app/common/transactions/stacks/is-sip-10-transfer.ts

GitHub Actions / lint-eslint

This assertion is unnecessary since it does not change the type of the expression
return (
payload.functionName.content === 'transfer' &&
(payload.functionArgs.length === 3 || payload.functionArgs.length === 4)
const { data: inscriptionData } = useInscriptionByOutput(transaction);
const bitcoinAddress = useCurrentAccountNativeSegwitAddressIndexZero();

Check warning on line 39 in src/app/components/bitcoin-transaction-item/bitcoin-transaction-item.tsx

GitHub Actions / lint-eslint

'useCurrentAccountNativeSegwitAddressIndexZero' is deprecated. Use signer.address instead
const { handleOpenBitcoinTxLink: handleOpenTxLink } = useBitcoinExplorerLink();
const caption = useMemo(() => getBitcoinTxCaption(transaction), [transaction]);
const value = useMemo(
import { Stamp } from './stamp';
export function Stamps() {
const currentAccountBtcAddress = useCurrentAccountNativeSegwitAddressIndexZero();

Check warning on line 12 in src/app/features/collectibles/components/bitcoin/stamps.tsx

GitHub Actions / lint-eslint

'useCurrentAccountNativeSegwitAddressIndexZero' is deprecated. Use signer.address instead
const { data: stamps = [] } = useStampsByAddress(currentAccountBtcAddress);
useEffect(() => {
const nativeSegwitSigner = useCurrentAccountNativeSegwitIndexZeroSigner();
const result = useGetBrc20TokensQuery({
createTaprootSigner,

Check failure on line 57 in src/app/query/bitcoin/ordinals/brc20/brc20-tokens.hooks.ts

GitHub Actions / typecheck

Type '((addressIndex: number) => Signer<P2TROut>) | undefined' is not assignable to type '((addressIndex: number) => BitcoinSigner<P2TROut>) | undefined'.
nativeSegwitAddress: nativeSegwitSigner.address,
});