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

chore: realocate, rename, uncommit config #434

Merged
merged 5 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules
dist
.env.local
paybutton/dev/demo/paybutton.js
react/coverage
react/coverage
paybutton-config.json
2 changes: 1 addition & 1 deletion react/lib/config.json → example-config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"wsBaseUrl": "http://localhost:5000",
"apiBaseUrl": "http://localhost:3000",
"altpaymentClient": "mocked"
"altpaymentClient": "sideshift"
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"license": "MIT",
"scripts": {
"dev": "cd paybutton && yarn dev",
"predev": "[ -f ./paybutton-config.json ] || cp ./example-config.json ./paybutton-config.json",
"prebuild": "[ -f ./paybutton-config.json ] || cp ./example-config.json ./paybutton-config.json",
"build:dev": "yarn build:react && yarn dev",
"test": "cd react && yarn test",
"test:coverage": "cd react && yarn test:coverage",
Expand Down
2 changes: 1 addition & 1 deletion react/lib/altpayment/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { MockedPaymentClient } from "./mocked"
import { SideshiftClient, SideshiftCoin, SideshiftError, SideshiftPair, SideshiftQuote, SideshiftShift } from "./sideshift"
import config from '../config.json'
import config from '../../../paybutton-config.json'

export const MINIMUM_ALTPAYMENT_DOLLAR_AMOUNT = 10

Expand Down
2 changes: 1 addition & 1 deletion react/lib/altpayment/mocked.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AltpaymentClient, AltpaymentShift } from ".";
import config from '../config.json'
import config from '../../../paybutton-config.json'

export class MockedPaymentClient implements AltpaymentClient {
public async getPaymentStatus (_id: string): Promise<AltpaymentShift> {
Expand Down
2 changes: 1 addition & 1 deletion react/lib/components/Widget/Widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import copy from 'copy-to-clipboard';
import QRCode, { BaseQRCodeProps } from 'qrcode.react';
import io, { Socket } from 'socket.io-client';
import PencilIcon from '../../assets/edit-pencil';
import config from '../../config.json';
import config from '../../../../paybutton-config.json';
import { Theme, ThemeName, ThemeProvider, useTheme } from '../../themes';
import { Button, animation } from '../Button/Button';
import BarChart from '../BarChart/BarChart';
Expand Down
2 changes: 1 addition & 1 deletion react/lib/util/api-client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios';
import _ from 'lodash';
import config from '../config.json'
import config from '../../../paybutton-config.json'
import { isValidCashAddress, isValidXecAddress } from './address';
import {
Transaction,
Expand Down
Loading