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

Release 0.13.6 #1207

Merged
merged 3 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions backend/controllers/cln/payments.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ export const postPayment = (req, res, next) => {
if (req.body.paymentType === 'OFFER') {
if (req.body.saveToDB && req.body.bolt12) {
const offerToUpdate = { bolt12: req.body.bolt12, amountMSat: (req.body.zeroAmtOffer ? 0 : req.body.amount), title: req.body.title, lastUpdatedAt: new Date(Date.now()).getTime() };
if (req.body.vendor) {
offerToUpdate['vendor'] = req.body.vendor;
if (req.body.issuer) {
offerToUpdate['issuer'] = req.body.issuer;
}
if (req.body.description) {
offerToUpdate['description'] = req.body.description;
Expand Down
6 changes: 3 additions & 3 deletions backend/models/database.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ export var OfferFieldsEnum;
OfferFieldsEnum["BOLT12"] = "bolt12";
OfferFieldsEnum["AMOUNTMSAT"] = "amountMSat";
OfferFieldsEnum["TITLE"] = "title";
OfferFieldsEnum["VENDOR"] = "vendor";
OfferFieldsEnum["ISSUER"] = "issuer";
OfferFieldsEnum["DESCRIPTION"] = "description";
})(OfferFieldsEnum || (OfferFieldsEnum = {}));
export class Offer {
constructor(bolt12, amountMSat, title, vendor, description, lastUpdatedAt) {
constructor(bolt12, amountMSat, title, issuer, description, lastUpdatedAt) {
this.bolt12 = bolt12;
this.amountMSat = amountMSat;
this.title = title;
this.vendor = vendor;
this.issuer = issuer;
this.description = description;
this.lastUpdatedAt = lastUpdatedAt;
}
Expand Down
2 changes: 1 addition & 1 deletion backend/utils/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export class CommonService {
};
this.handleError = (errRes, fileName, errMsg, selectedNode) => {
let err = JSON.parse(JSON.stringify(errRes));
if (Object.keys(err.error).length === 0 && errRes.error && (errRes.error.stack || errRes.error.message)) {
if (err && err.error && Object.keys(err.error).length === 0 && errRes.error && (errRes.error.stack || errRes.error.message)) {
errRes.error = errRes.error.stack || errRes.error.message;
err = JSON.parse(JSON.stringify(errRes));
}
Expand Down
1 change: 1 addition & 0 deletions frontend/564.34d502899be1574e.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion frontend/564.f4d4e152dc4f0a63.js

This file was deleted.

4 changes: 2 additions & 2 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<link i18n-rel="" rel="mask-icon" href="assets/images/favicon-light/safari-pinned-tab.svg" color="#5bbad5">
<meta i18n-content="" name="msapplication-TileColor" content="#da532c">
<meta i18n-content="" name="theme-color" content="#ffffff">
<style>html{width:100%;height:99%;line-height:1.5;overflow-x:hidden;font-family:Roboto,sans-serif!important;font-size:100%}@media only screen and (max-width: 56.25em){html{font-size:90%}}@media only screen and (max-width: 37.5em){html{font-size:80%}}body{box-sizing:border-box;height:100%;margin:0;overflow:hidden}*{margin:0;padding:0}@font-face{font-family:Roboto;src:url(Roboto-Thin.f7a95c9c5999532c.woff2) format("woff2"),url(Roboto-Thin.c13c157cb81e8ebb.woff) format("woff");font-weight:100;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-ThinItalic.b0e084abf689f393.woff2) format("woff2"),url(Roboto-ThinItalic.1111028df6cea564.woff) format("woff");font-weight:100;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Light.0e01b6cd13b3857f.woff2) format("woff2"),url(Roboto-Light.603ca9a537b88428.woff) format("woff");font-weight:300;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-LightItalic.232ef4b20215f720.woff2) format("woff2"),url(Roboto-LightItalic.1b5e142f787151c8.woff) format("woff");font-weight:300;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Regular.475ba9e4e2d63456.woff2) format("woff2"),url(Roboto-Regular.bcefbfee882bc1cb.woff) format("woff");font-weight:400;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-RegularItalic.e3a9ebdaac06bbc4.woff2) format("woff2"),url(Roboto-RegularItalic.0668fae6af0cf8c2.woff) format("woff");font-weight:400;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Medium.457532032ceb0168.woff2) format("woff2"),url(Roboto-Medium.6e1ae5f0b324a0aa.woff) format("woff");font-weight:500;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-MediumItalic.872f7060602d55d2.woff2) format("woff2"),url(Roboto-MediumItalic.e06fb533801cbb08.woff) format("woff");font-weight:500;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Bold.447291a88c067396.woff2) format("woff2"),url(Roboto-Bold.fc482e6133cf5e26.woff) format("woff");font-weight:700;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-BoldItalic.1b15168ef6fa4e16.woff2) format("woff2"),url(Roboto-BoldItalic.e26ba339b06f09f7.woff) format("woff");font-weight:700;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Black.2eaa390d458c877d.woff2) format("woff2"),url(Roboto-Black.b25f67ad8583da68.woff) format("woff");font-weight:900;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-BlackItalic.7dc03ee444552bc5.woff2) format("woff2"),url(Roboto-BlackItalic.c8dc642467cb3099.woff) format("woff");font-weight:900;font-style:italic}</style><link rel="stylesheet" href="styles.c7a6e1a24b7a5469.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.c7a6e1a24b7a5469.css"></noscript></head>
<style>html{width:100%;height:99%;line-height:1.5;overflow-x:hidden;font-family:Roboto,sans-serif!important;font-size:100%}@media only screen and (max-width: 56.25em){html{font-size:90%}}@media only screen and (max-width: 37.5em){html{font-size:80%}}body{box-sizing:border-box;height:100%;margin:0;overflow:hidden}*{margin:0;padding:0}@font-face{font-family:Roboto;src:url(Roboto-Thin.f7a95c9c5999532c.woff2) format("woff2"),url(Roboto-Thin.c13c157cb81e8ebb.woff) format("woff");font-weight:100;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-ThinItalic.b0e084abf689f393.woff2) format("woff2"),url(Roboto-ThinItalic.1111028df6cea564.woff) format("woff");font-weight:100;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Light.0e01b6cd13b3857f.woff2) format("woff2"),url(Roboto-Light.603ca9a537b88428.woff) format("woff");font-weight:300;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-LightItalic.232ef4b20215f720.woff2) format("woff2"),url(Roboto-LightItalic.1b5e142f787151c8.woff) format("woff");font-weight:300;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Regular.475ba9e4e2d63456.woff2) format("woff2"),url(Roboto-Regular.bcefbfee882bc1cb.woff) format("woff");font-weight:400;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-RegularItalic.e3a9ebdaac06bbc4.woff2) format("woff2"),url(Roboto-RegularItalic.0668fae6af0cf8c2.woff) format("woff");font-weight:400;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Medium.457532032ceb0168.woff2) format("woff2"),url(Roboto-Medium.6e1ae5f0b324a0aa.woff) format("woff");font-weight:500;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-MediumItalic.872f7060602d55d2.woff2) format("woff2"),url(Roboto-MediumItalic.e06fb533801cbb08.woff) format("woff");font-weight:500;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Bold.447291a88c067396.woff2) format("woff2"),url(Roboto-Bold.fc482e6133cf5e26.woff) format("woff");font-weight:700;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-BoldItalic.1b15168ef6fa4e16.woff2) format("woff2"),url(Roboto-BoldItalic.e26ba339b06f09f7.woff) format("woff");font-weight:700;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Black.2eaa390d458c877d.woff2) format("woff2"),url(Roboto-Black.b25f67ad8583da68.woff) format("woff");font-weight:900;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-BlackItalic.7dc03ee444552bc5.woff2) format("woff2"),url(Roboto-BlackItalic.c8dc642467cb3099.woff) format("woff");font-weight:900;font-style:italic}</style><link rel="stylesheet" href="styles.69f6c7558eabf011.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.69f6c7558eabf011.css"></noscript></head>
<body>
<rtl-app></rtl-app>
<script src="runtime.865dd8ddb1f98109.js" type="module"></script><script src="polyfills.9720483e1820202a.js" type="module"></script><script src="main.e9d7a82157c70703.js" type="module"></script>
<script src="runtime.4565d399c2c0ce89.js" type="module"></script><script src="polyfills.9720483e1820202a.js" type="module"></script><script src="main.828ba9b6ca158ec5.js" type="module"></script>

</body></html>
1 change: 1 addition & 0 deletions frontend/main.828ba9b6ca158ec5.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion frontend/main.e9d7a82157c70703.js

This file was deleted.

1 change: 1 addition & 0 deletions frontend/runtime.4565d399c2c0ce89.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion frontend/runtime.865dd8ddb1f98109.js

This file was deleted.

1 change: 1 addition & 0 deletions frontend/styles.69f6c7558eabf011.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion frontend/styles.c7a6e1a24b7a5469.css

This file was deleted.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rtl",
"version": "0.13.5-beta",
"version": "0.13.6-beta",
"license": "MIT",
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion server/controllers/cln/payments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const postPayment = (req, res, next) => {
if (req.body.paymentType === 'OFFER') {
if (req.body.saveToDB && req.body.bolt12) {
const offerToUpdate: Offer = { bolt12: req.body.bolt12, amountMSat: (req.body.zeroAmtOffer ? 0 : req.body.amount), title: req.body.title, lastUpdatedAt: new Date(Date.now()).getTime() };
if (req.body.vendor) { offerToUpdate['vendor'] = req.body.vendor; }
if (req.body.issuer) { offerToUpdate['issuer'] = req.body.issuer; }
if (req.body.description) { offerToUpdate['description'] = req.body.description; }
// eslint-disable-next-line arrow-body-style
return databaseService.validateDocument(CollectionsEnum.OFFERS, offerToUpdate).then((validated) => {
Expand Down
4 changes: 2 additions & 2 deletions server/models/database.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export enum OfferFieldsEnum {
BOLT12 = 'bolt12',
AMOUNTMSAT = 'amountMSat',
TITLE = 'title',
VENDOR = 'vendor',
ISSUER = 'issuer',
DESCRIPTION = 'description'
}

Expand All @@ -12,7 +12,7 @@ export class Offer {
public bolt12: string,
public amountMSat: number,
public title: string,
public vendor?: string,
public issuer?: string,
public description?: string,
public lastUpdatedAt?: number
) { }
Expand Down
2 changes: 1 addition & 1 deletion server/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export class CommonService {

public handleError = (errRes, fileName, errMsg, selectedNode: CommonSelectedNode) => {
let err = JSON.parse(JSON.stringify(errRes));
if (Object.keys(err.error).length === 0 && errRes.error && (errRes.error.stack || errRes.error.message)) {
if (err && err.error && Object.keys(err.error).length === 0 && errRes.error && (errRes.error.stack || errRes.error.message)) {
errRes.error = errRes.error.stack || errRes.error.message;
err = JSON.parse(JSON.stringify(errRes));
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/cln/store/cln.actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export const fetchOffers = createAction(CLNActions.FETCH_OFFERS_CLN);

export const setOffers = createAction(CLNActions.SET_OFFERS_CLN, props<{ payload: Offer[] }>());

export const saveNewOffer = createAction(CLNActions.SAVE_NEW_OFFER_CLN, props<{ payload: { amount: string, description: string, vendor: string } }>());
export const saveNewOffer = createAction(CLNActions.SAVE_NEW_OFFER_CLN, props<{ payload: { amount: string, description: string, issuer: string } }>());

export const addOffer = createAction(CLNActions.ADD_OFFER_CLN, props<{ payload: Offer }>());

Expand Down
4 changes: 2 additions & 2 deletions src/app/cln/store/cln.effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -752,11 +752,11 @@ export class CLNEffects implements OnDestroy {

saveNewOfferCL = createEffect(() => this.actions.pipe(
ofType(CLNActions.SAVE_NEW_OFFER_CLN),
mergeMap((action: { type: string, payload: { amount: string, description: string, vendor: string } }) => {
mergeMap((action: { type: string, payload: { amount: string, description: string, issuer: string } }) => {
this.store.dispatch(openSpinner({ payload: UI_MESSAGES.CREATE_OFFER }));
this.store.dispatch(updateCLAPICallStatus({ payload: { action: 'SaveNewOffer', status: APICallStatusEnum.INITIATED } }));
return this.httpClient.post(this.CHILD_API_URL + API_END_POINTS.OFFERS_API, {
amount: action.payload.amount, description: action.payload.description, vendor: action.payload.vendor
amount: action.payload.amount, description: action.payload.description, issuer: action.payload.issuer
}).pipe(map((postRes: Offer) => {
this.logger.info(postRes);
this.store.dispatch(updateCLAPICallStatus({ payload: { action: 'SaveNewOffer', status: APICallStatusEnum.COMPLETED } }));
Expand Down
2 changes: 1 addition & 1 deletion src/app/cln/store/cln.reducers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export const CLNReducer = createReducer(initCLNState,
updatedOffer.amountMSat = payload.amountMSat;
updatedOffer.lastUpdatedAt = payload.lastUpdatedAt;
updatedOffer.description = payload.description;
updatedOffer.vendor = payload.vendor;
updatedOffer.issuer = payload.issuer;
newOfferBMs.splice(offerBMExistsIdx, 1, updatedOffer);
}
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<mat-hint>{{offerValueHint}}</mat-hint>
</mat-form-field>
<mat-form-field fxLayout="column" fxFlex="58" fxLayoutAlign="start end">
<mat-label>Vendor</mat-label>
<input matInput tabindex="3" name="vendor" [(ngModel)]="vendor">
<mat-label>Issuer</mat-label>
<input matInput tabindex="3" name="issuer" [(ngModel)]="issuer">
</mat-form-field>
</div>
<div *ngIf="offerError !== ''" fxFlex="100" class="alert alert-danger mt-1">
Expand Down
Loading
Loading