Skip to content

Commit

Permalink
feat: move console.debug to console.log in docs (#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
tibi77 authored May 17, 2023
1 parent 3aa6d4c commit 6ebd758
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/docs/examples/AddAssets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function AddAssets() {

const [handleAddAsset, isSingingMessage, errorSigningMessage] = useLoading(
async (assets: Asset[]) => {
console.debug('Add Assets', assets);
console.log('Add Assets', assets);
/* example:start */
await fuel.addAssets(assets);
/* example:end */
Expand Down
8 changes: 4 additions & 4 deletions packages/docs/examples/Connect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ export function Connect() {
const [connected, setConnected] = useState(false);

const [handleConnect, isConnecting, errorConnect] = useLoading(async () => {
console.debug('Request connection to Wallet!');
console.log('Request connection to Wallet!');
/* example:start */
const isConnected = await fuel.connect();
console.debug('Connection response', isConnected);
console.log('Connection response', isConnected);
/* example:end */
setConnected(isConnected);
});

const [handleDisconnect, isDisconnecting, errorDisconnect] = useLoading(
async () => {
console.debug('Request disconnection to Wallet!');
console.log('Request disconnection to Wallet!');
await fuel.disconnect();
setConnected(false);
console.debug('Disconnection response');
console.log('Disconnection response');
}
);

Expand Down
4 changes: 2 additions & 2 deletions packages/docs/examples/CurrentAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ export function CurrentAccount() {
const [currentAccount, setCurrentAccount] = useState<string>('');
const [handleCurrentAccount, isLoadingCurrentAccount, errorCurrentAccount] =
useLoading(async () => {
console.debug('Request currentAccount to Wallet!');
console.log('Request currentAccount to Wallet!');
/* example:start */
const currentAccount = await fuel.currentAccount();
console.debug('Current Account ', currentAccount);
console.log('Current Account ', currentAccount);
/* example:end */
setCurrentAccount(currentAccount);
});
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/examples/ListAccounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ export function ListAccounts() {
const [accounts, setAccounts] = useState<Array<string>>([]);
const [handleGetAccounts, isLoadingAccounts, errorGetAccounts] = useLoading(
async () => {
console.debug('Request accounts to Wallet!');
console.log('Request accounts to Wallet!');
/* example:start */
const accounts = await fuel.accounts();
console.debug('Accounts ', accounts);
console.log('Accounts ', accounts);
/* example:end */
setAccounts(accounts);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/examples/ListAssets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ export function ListAssets() {
const [assets, setAssets] = useState<Array<Asset>>([]);
const [handleGetAssets, isLoadingAssets, errorGetAssets] = useLoading(
async () => {
console.debug('Request assets to Wallet!');
console.log('Request assets to Wallet!');
/* example:start */
const assets = await fuel.assets();
console.debug('Assets ', assets);
console.log('Assets ', assets);
/* example:end */
setAssets(assets);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/examples/SignMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ export function SignMessage() {

const [handleSignMessage, isSingingMessage, errorSigningMessage] = useLoading(
async (message: string) => {
console.debug('Request signature of message!');
console.log('Request signature of message!');
/* example:start */
const accounts = await fuel.accounts();
const account = accounts[0];
const wallet = await fuel.getWallet(account);
const signedMessage = await wallet.signMessage(message);
console.debug('Message signature', signedMessage);
console.log('Message signature', signedMessage);
/* example:end */
setSignedMessage(signedMessage);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/examples/Transfer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ export function Transfer() {

const [sendTransaction, sendingTransaction, errorSendingTransaction] =
useLoading(async (amount: BN, addr: string, assetId: string) => {
console.debug('Request signature transaction!');
console.log('Request signature transaction!');
/* example:start */
const accounts = await fuel.accounts();
const account = accounts[0];
const wallet = await fuel.getWallet(account);
const toAddress = Address.fromString(addr);
const response = await wallet.transfer(toAddress, amount, assetId);
console.debug('Transaction created!', response.id);
console.log('Transaction created!', response.id);
/* example:end */
setProviderUrl(wallet.provider.url);
setTxId(response.id);
Expand Down

0 comments on commit 6ebd758

Please sign in to comment.